### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
ServerName nd.ruin.nu
ServerAlias ndtest.ruin.nu
ErrorLog /var/log/apache2/ndawn_error_log
#TransferLog logs/ndawn_access_log
CustomLog /var/log/apache2/ndawn_access_log "%h %l %u [%{%F %H:%M:%S}t] \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\" PUB"
Alias /static /var/www/ndawn/root/static
Alias /robots.txt /var/www/ndawn/root/robots.txt
Alias /favicon.ico /var/www/ndawn/root/static/favicon.ico
FastCgiExternalServer /tmp/ndwebpub.fcgi -socket /tmp/ndweb.socket
Alias / /tmp/ndwebpub.fcgi/
Allow from all
DeflateFilterNote ratio
SetHandler default-handler
ExpiresActive On
ExpiresDefault "access plus 1 week"
#ExpiresByType text/css "access plus 1 week"
#ExpiresByType application/javascript "access plus 1 week"
#ExpiresByType image/png "access plus 1 week"
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript
Listen 1337
ServerName nd.ruin.nu
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/nd.crt
SSLCertificateKeyFile /etc/apache2/ssl/nd.key
RewriteEngine On
RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R]
NameVirtualHost *:443
ServerName nd.ruin.nu
ServerAlias ndtest.ruin.nu
ErrorLog /var/log/apache2/ndawn_error_log
#TransferLog logs/ndawn_access_log
CustomLog /var/log/apache2/ndawn_access_log "%h %l %u [%{%F %H:%M:%S}t] \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\" SSL"
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
Alias /static /var/www/ndawn/root/static
Alias /robots.txt /var/www/ndawn/root/robots.txt
Alias /favicon.ico /var/www/ndawn/root/static/favicon.ico
FastCgiExternalServer /tmp/ndweb.fcgi -socket /tmp/ndweb.socket
Alias / /tmp/ndweb.fcgi/
Allow from all
DeflateFilterNote ratio
SetHandler default-handler
ExpiresActive On
ExpiresDefault "access plus 1 week"
#ExpiresByType text/css "access plus 1 week"
#ExpiresByType application/javascript "access plus 1 week"
#ExpiresByType image/png "access plus 1 week"
Header append Cache-Control "public"
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript