I am confused about best practices for virtual hosts under Debian LAMP setup
I have created my virtual hosts under ..../apache2/sites-available
and ran a2ensite sitename
that configuration works, but one domain supersedes the other (local server, development machine running Ubuntu 8.10
I moved both configurations to my httpd.conf file, and everything seems happier.
Is it better to use separate files under sites-avaiable/sites-enabled or to throw everything into httpd.conf?
and why? :)
I have a site with multiple subdomains. I just put a lot of stuff into /etc/apache2/sites-enabled/000-default and runs "apache2ctl restart" and it works perfectly. Though if you have a lot of different virtual hosts you could put them in seperate files just to make it easier to manage (for humans). But I don't believe that there is any difference for apache in which file or how many files you have you configuration in. As long as all files are parsed it should work out fine.
Anyway, here's my virtual hosts:
I also commented out the line "NameVirtualHost *:80" inside /etc/apache2/ports.conf to get rid of a warning message when booting apache.
|All times are GMT -5. The time now is 01:14 AM.|