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

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

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>

But there was alreay a long <VirtualHost *:80> statement in there with
many directives. It seems the way apache2 is set up it uses a virtual
host for the regular host (/var/www on localhost).

So is it ok to just add my <VirtualHost *:80> my new stuff
</VirtualHost> after the first VirtualHost block already in there? I
just did that and this is what i have now:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128


<VirtualHost *:80>
       ServerName darcs.jesujuva.org
       ServerAlias jesujuva.org www.jesujuva.org darcs.jesujuva.org
       DocumentRoot /var/www/darcs


Reply to: