[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apache2 in Debian - adding vhost - which file to edit?





2008/9/9 Zach Uram <netrek@gmail.com>
I am trying to add a name based virtual host to apache2-mpm-prefork
version 2.2.9-7 on Debian lenny/sid.

First I read to edit /etc/apache2/httpd.conf but this file it seems is
empty and not used in Debian.

Then I read to edit /etc/apache2/apache2.conf but it seems that is
also not the right place for adding it so then
I found the file /etc/apache2/sites-enabled/000-default

This is the correct file to edit? I was told to add my section to it such as:

<VirtualHost *:80>
.....
</VirtualHost>


yes, but 000-default file should be left alone with standard directives for your DocRoot /var/www/

then you should put directives for any other web site you are going to add in a separate file in /etc/apache2/sites-available/ and then create a symlink to it in
 /etc/apache2/sites-enabled/

so you can simply remove the symlink if you ever want to put sites offline instead of commenting out lines on a single, maybe huge, conf file, moreover you gain better control on per site directives

(before going online) http://httpd.apache.org/docs/2.2/

regards




Reply to: