I have a Zend Framework project on a local machine, and as recommended its /public subfolder is made a DocumentRoot in httpd.conf. So I access this app simply with http://localhost.
This new requirement makes me unable to access other
web apps in a former webserver root (which contains a few regular php apps and a couple of zend framework apps).
What configuration should I choose to be able to simultaneously access both ZF root-based apps and other apps like PHPMYADMIN?
You’ll probably need to use some kind of
VirtualHostYou have at least two solutions :
In the second case (the solution I always use), you will have to edit your “
hosts” file, so “mytestwebsite” is an alias to your local machine — which IP address is 127.0.0.1Under windows, this file is located in
C:\WINDOWS\system32\drivers\etcOn Linux, it’s in
/etc/You’d have to add a line like these ones :
Then, in the Apache configuration, you need to create one VirtualHost per site. Something like this, I suppose :
(Needs tunning / configuration, of course)
And you’ll also probably need some directive like this one :
Well, this might not be the entire solution (that one depends on your server / applications) ; but I hope these few pointers will help you get to it !
If you need more help, the keyword is “VirtualHost” 😉
Have fun !