1 ### Section 3: Virtual Hosts
3 # VirtualHost: If you want to maintain multiple domains/hostnames on your
4 # machine you can setup VirtualHost containers for them. Most configurations
5 # use only name-based virtual hosts so the server doesn't need to worry about
6 # IP addresses. This is indicated by the asterisks in the directives below.
8 # Please see the documentation at
9 # <URL:http://httpd.apache.org/docs-2.0/vhosts/>
10 # for further details before you try to setup virtual hosts.
12 # You may use the command line option '-S' to verify your virtual host
20 RewriteCond %{HTTPS} !=on
21 RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R]
31 SSLCertificateFile /etc/apache2/ssl/nd.crt
32 SSLCertificateKeyFile /etc/apache2/ssl/nd.key
35 RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R]
44 ErrorLog /var/log/apache2/ndawn_error_log
45 <IfModule mod_log_config.c>
46 #TransferLog logs/ndawn_access_log
47 CustomLog /var/log/apache2/ndawn_access_log "%h %l %u [%{%F %H:%M:%S}t] \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\""
50 <IfModule setenvif_module>
51 BrowserMatch ".*MSIE.*" \
52 nokeepalive ssl-unclean-shutdown \
53 downgrade-1.0 force-response-1.0
56 Alias /static /var/www/ndawn/root/static
57 Alias /favicon.ico /var/www/ndawn/root/favicon.ico
59 FastCgiExternalServer /tmp/ndweb.fcgi -socket /tmp/ndweb.socket
60 Alias / /tmp/ndweb.fcgi/
66 DeflateFilterNote ratio
68 SetHandler default-handler
71 ExpiresDefault "access plus 1 week"
72 #ExpiresByType text/css "access plus 1 week"
73 #ExpiresByType application/javascript "access plus 1 week"
74 #ExpiresByType image/png "access plus 1 week"
76 AddOutputFilterByType DEFLATE text/html
77 AddOutputFilterByType DEFLATE text/xml
78 AddOutputFilterByType DEFLATE text/css
79 AddOutputFilterByType DEFLATE application/javascript
80 AddOutputFilterByType DEFLATE application/x-javascript
81 AddOutputFilterByType DEFLATE application/xhtml+xml
82 AddOutputFilterByType DEFLATE application/xml
83 AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript