dyn.manpages.d.o: let auxserver handle redirects, serve static assets
[mirror/dsa-puppet.git] / modules / roles / templates / manpages / dyn.manpages.debian.org.erb
1 Use common-debian-service-https-redirect * dyn.manpages.debian.org
2
3 <VirtualHost *:443>
4         ServerName dyn.manpages.debian.org
5         ServerAdmin debian-admin@lists.debian.org
6
7         Use common-debian-service-ssl dyn.manpages.debian.org
8         Use common-ssl-HSTS
9         Use http-pkp-dyn.manpages.debian.org
10
11         ErrorLog /var/log/apache2/dyn.manpages.debian.org-error.log
12         CustomLog /var/log/apache2/dyn.manpages.debian.org-access.log privacy
13
14         DocumentRoot /srv/manpages.debian.org/www
15
16         <Directory /srv/manpages.debian.org/www>
17                 Require all granted
18                 AllowOverride none
19
20                 ExpiresActive On
21                 ExpiresDefault "access plus 1 hours"
22
23                 <Files ~ "^rwmap">
24                         Order allow,deny
25                         Deny from all
26                 </Files>
27
28                 # To set the correct Content-Type (e.g. text/html).
29                 RemoveType .gz
30                 AddEncoding gzip gz
31                 FilterDeclare gzip CONTENT_SET
32                 FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip,.*gzip/"
33                 FilterChain gzip
34                 Options +Multiviews
35         </Directory>
36
37         <Location /auxserver/>
38                 ProxyPass "http://localhost:2431/"
39                 ProxyPassReverse "http://localhost:2431/"
40
41                 # Use the correct host in redirects
42                 Header edit Location "^/" "https://manpages.debian.org/"
43         </Location>
44
45         ErrorDocument 404 /auxserver%{REQUEST_URI}?%{QUERY_STRING}
46 </VirtualHost>
47
48 # vim:set syn=apache: