Setting up virtual hosts

Discussion in 'Apache' started by RichardAlan, Aug 24, 2008.

  1. #1
    Hello, I'm very new to this but I created the following list of instructions.

    - Can someone out there confirm this is all that's needed.
    - Can someone explain what this code is doing => Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all

    Thanks in advance for any help / advice you can give.

    Richard


    Here's my list of instructions I created for myself:

    login as root

    mkdir /var/www/html/abc.com
    mkdir /var/www/html/abc.com/public
    mkdir /var/www/html/abc.com/private
    mkdir /var/www/html/abc.com/cgi-bin
    mkdir /var/www/html/abc.com/logs
    touch /var/www/html/abc.com/logs/abc.com_error_log
    touch /var/www/html/abc.com/logs/abc.com_access_log
    cd /var
    chod -R 755 /var/www/html/abc.com

    ADD the following to /etc/httpd/conf/httpd.conf

    NameVirtualHost *:80

    <VirtualHost abc.com>

    ServerName abc.com
    ServerAlias abc.com *.abc.com
    ServerAdmin webmaster@abc.com

    DocumentRoot /var/www/html/abc.com

    <Directory /var/www/html/abc.com>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

    <Directory /var/www/html/abc.com/cgi-bin/>
    Options +ExecCGI
    AddHandler cgi-script cgi pl
    </Directory>


    ErrorLog /var/www/html/abc.com/log/abc.com-error.log
    LogLevel warn
    CustomLog /var/www/html/abc.com/log/abc.com-access.log combined
    ServerSignature On

    </VirtualHost>

    Test using

    /usr/sbin/apachectl configtest

    wait for OK

    Restart

    /usr/sbin/apachectl graceful
     
    RichardAlan, Aug 24, 2008 IP