]> ruin.nu Git - ndwebbie.git/blob - apache-conf.conf
Only run password trigger when password is changed
[ndwebbie.git] / apache-conf.conf
1 ### Section 3: Virtual Hosts
2 #
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.
7 #
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.
11 #
12 # You may use the command line option '-S' to verify your virtual host
13 # configuration.
14
15
16 <VirtualHost *:80>
17         ServerName nd.ruin.nu
18         ServerAlias ndtest.ruin.nu
19
20         ErrorLog /var/log/apache2/ndawn_error_log
21         <IfModule mod_log_config.c>
22                 #TransferLog logs/ndawn_access_log
23                 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"
24         </IfModule>
25
26         Alias /static /var/www/ndawn/root/static
27         Alias /robots.txt /var/www/ndawn/root/robots.txt
28         Alias /favicon.ico /var/www/ndawn/root/static/favicon.ico
29
30         FastCgiExternalServer /tmp/ndwebpub.fcgi -socket /tmp/ndweb.socket
31         Alias / /tmp/ndwebpub.fcgi/
32
33         <Location />
34                 Allow from all
35         </Location>
36
37         DeflateFilterNote ratio
38         <Location /static>
39                 SetHandler default-handler
40
41                 ExpiresActive On
42                 ExpiresDefault "access plus 1 week"
43                 #ExpiresByType text/css "access plus 1 week"
44                 #ExpiresByType application/javascript "access plus 1 week"
45                 #ExpiresByType image/png "access plus 1 week"
46
47                 AddOutputFilterByType DEFLATE text/html
48                 AddOutputFilterByType DEFLATE text/xml
49                 AddOutputFilterByType DEFLATE text/css
50                 AddOutputFilterByType DEFLATE application/javascript
51                 AddOutputFilterByType DEFLATE application/x-javascript
52                 AddOutputFilterByType DEFLATE application/xhtml+xml
53                 AddOutputFilterByType DEFLATE application/xml
54                 AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript
55         </Location>
56 </VirtualHost>
57
58 Listen 1337
59
60 <VirtualHost *:1337>
61         ServerName nd.ruin.nu
62
63         SSLEngine on
64         SSLCertificateFile /etc/apache2/ssl/nd.crt
65         SSLCertificateKeyFile /etc/apache2/ssl/nd.key
66
67         RewriteEngine On
68         RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R]
69
70 </VirtualHost>
71
72 NameVirtualHost *:443
73
74 <VirtualHost *:443>
75         ServerName nd.ruin.nu
76         ServerAlias ndtest.ruin.nu
77
78         ErrorLog /var/log/apache2/ndawn_error_log
79         <IfModule mod_log_config.c>
80                 #TransferLog logs/ndawn_access_log
81                 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"
82         </IfModule>
83
84         SSLEngine on
85         SSLCertificateFile /etc/apache2/ssl/server.crt
86         SSLCertificateKeyFile /etc/apache2/ssl/server.key
87
88
89         <IfModule setenvif_module>
90                 BrowserMatch ".*MSIE.*" \
91                         nokeepalive ssl-unclean-shutdown \
92                         downgrade-1.0 force-response-1.0
93         </IfModule>
94
95         Alias /static /var/www/ndawn/root/static
96         Alias /robots.txt /var/www/ndawn/root/robots.txt
97         Alias /favicon.ico /var/www/ndawn/root/static/favicon.ico
98
99         FastCgiExternalServer /tmp/ndweb.fcgi -socket /tmp/ndweb.socket
100         Alias / /tmp/ndweb.fcgi/
101
102         <Location />
103                 Allow from all
104         </Location>
105
106         DeflateFilterNote ratio
107         <Location /static>
108                 SetHandler default-handler
109
110                 ExpiresActive On
111                 ExpiresDefault "access plus 1 week"
112                 #ExpiresByType text/css "access plus 1 week"
113                 #ExpiresByType application/javascript "access plus 1 week"
114                 #ExpiresByType image/png "access plus 1 week"
115                 Header append Cache-Control "public"
116
117                 AddOutputFilterByType DEFLATE text/html
118                 AddOutputFilterByType DEFLATE text/xml
119                 AddOutputFilterByType DEFLATE text/css
120                 AddOutputFilterByType DEFLATE application/javascript
121                 AddOutputFilterByType DEFLATE application/x-javascript
122                 AddOutputFilterByType DEFLATE application/xhtml+xml
123                 AddOutputFilterByType DEFLATE application/xml
124                 AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript
125         </Location>
126 </VirtualHost>