rendered paste body<VirtualHost *: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>
# Below we catch ips and alternate names
NameVirtualHost *:2800
<VirtualHost *:2800>
ServerAlias *
DocumentRoot "/virtualhosts/"
# 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
ServerSignature On
</VirtualHost>