apache2 vhost site makes default site inaccessible
i'm trying to setup a local LAMP development environment. i had apache2, php5, mysql5, and phpmyadmin up and running.
i tried adding a virtualhost entry to point to a development folder, though, and now localhost is directed to that folder instead of /var/www. (i'm using the updated sites-available, sites-enabled virtualhost config). is there something i should have changed in the default site config in sites-available to make sure only dev.mysite.com and www.dev.mysite.com address are routed to the alternative DocRoot? i want to keep /var/www as the root for localhost addresses. hope thats clear. thanks! here are the contents of the new conf file in sites-available: Code:
<VirtualHost dev.mysite.com> |
I'm not a pro, but as I understand it, once you switch to using virtual hosts, the first virtual host you list becomes the default. Create a virtual host for what you want to be the default, then list any other virtual hosts after that.
|
ok, but how exactly does that work with the sites-enabled way of listing hosts? that is, in that way the "list" of hosts is a directory of symlinks and doesn't really have an order.
|
I believe they are processed in numberical/alphabetical order (which would explain why "000" begins the default). See http://www.linux.com/article.pl?sid=05/09/01/186204.
|
great! of course that makes a lot of sense. while the site name (which starts with 'd') is definitely after 000, it's good to know about the processing order.
the link you gave helped a lot and now i've got it working. i thought that the VirtualHost start tag should include the site name. by changing it from Code:
<VirtualHost dev.mysite.com> Code:
<VirtualHost *> thanks for the help! |
All times are GMT -5. The time now is 10:50 PM. |