All pastes #738225 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-16 02:59 UTC
rendered paste body
<VirtualHost  192.168.1.103:2800>      
        ServerName shoggoth.dyndns.biz
        ServerAlias *.shoggoth.dyndns.biz
        
        DocumentRoot "/virtualhosts/"

        AddHandler cgi-script .cgi

        RewriteEngine On

        # Ignore Rewrite rules if referencing "icons" directory
        RewriteRule ^/icons/ - [L]

        # set SUBDOMAIN
        RewriteCond %{HTTP_HOST} ^(.+)\.\w+\.+\w+$
        RewriteRule . - [E=SUBDOMAIN:%1]

        # if SUBDOMAIN == ""
        # Redirect to www.%{HTTP_HOST}
        # Else grab the proper file
        RewriteCond %{ENV:SUBDOMAIN} =""
        RewriteRule ^/(.*)$ http://%{HTTP_HOST}/$1 [R,L]
        RewriteRule ^/(.*)$ %{DOCUMENT_ROOT}/%{ENV:SUBDOMAIN}/www/$1 [L]

        # Rewrite Logging, hits heavy on the server, turn off when not needed
        RewriteLogLevel 9
        RewriteLog /var/log/apache2/rewrite.log

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

        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined
      
        DirectoryIndex index.html index.php
 
        ServerSignature On

        <Location />
#               Options ExecCGI
        </Location>
</VirtualHost>