fracasula
9/12/2013 - 9:16 AM

Simple Apache2 Virtual Host

Simple Apache2 Virtual Host

# /etc/apache2/sites-enabled/site

<VirtualHost *:80>

        RewriteEngine On
        RewriteOptions Inherit

        ServerAdmin admin@example.com

        ServerName example.com
        ServerAlias www.example.com
        ServerAlias admin.example.com

        DocumentRoot /var/www/example

        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>

        <Directory "/var/www/example/">
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        LogLevel warn        
        ErrorLog ${APACHE_LOG_DIR}/error_example.log
        CustomLog ${APACHE_LOG_DIR}/access_example.log combined
        ServerSignature Off

</VirtualHost>