I'm using Vagrant 1.6.3 for running Ubuntu 12.04 virtual machine. On this virtual machine I have Apache 2.4.9. For a long time Apache served only one site- there was 000-default.conf file in the /sites-available directory.
Now I want to add another site. I've created 2 files in /sites-available directory:
- site1.local.conf
- site2.local.conf
and I renamed 000-default.conf to default. Also I added site1.local and site2.local hosts to the ./etc/hosts file on the main machine.
Server names in Apache configs are set to site1.local and site2.local correspondently. And when I input http://site1.local:8080/ and http://site2.local:8080/ in browser everything works.
But I don't understand why http://localhost:8080/ still points to the first site? In what config should I define mapping for "localhost"? After setting up server names in apache configs I thought that http://localhost:8080/ should return "Can not connect to server" error.