I have a working installation of apache and mysql using standard ports, and my host file points domains to 127.0.0.1.
I'm in the process of switching my LAMP stack to Zend Server but want my old set up working simultaneously.
I tried switching the old apache port to 8080, and a different port for the old mysql. This seems to work OK (apache is working, mysql is listening on the new port but I've not tried a database connection).
However my problem is that I can't map domains to 8080 on localhost because host file doesn't handle ports, just IP address.
I should mention that I'm on a Windows machine.
Any ideas how I would solve this so I can use hosts file to map domains to 2 different LAMP stacks?
Regarding hosts file and virtualhost - When I go to localhost I get my new Zend apache running, when I go to localhost:8080 I have my old apache document root. This is as expected.
However I can't get hosts file and virtual hosts working on :8080. In my host file I have
and in my virtualhosts (httpd-vhosts.conf on my old apache instance, not my Zend instance) I have
NameVirtualHost *:8080 <VirtualHost *:8080> DocumentRoot "C:/xampp/htdocs" </VirtualHost> <VirtualHost *:8080> DocumentRoot "C:\xampp\htdocs\example.dev" ServerName example.dev </VirtualHost>
Now when I try example.dev in my browser I get 'server not found' so I think that the virtualhosts did not work.