add dyn.manpages role and vhost
[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         # URLs which end in a slash do not need to be rewritten
15         RewriteEngine on
16         RewriteRule ^(.*/)$ "https://manpages.debian.org$1" [R=307,L]
17
18         # Redirect fully qualified URLs to the correct host.
19         RewriteCond "/srv/manpages.debian.org/www/%{REQUEST_FILENAME}" "-f" [OR]
20         RewriteCond "/srv/manpages.debian.org/www/%{REQUEST_FILENAME}.gz" "-f"
21         RewriteRule "^/(.*)" "https://manpages.debian.org/$1" [R=307,L]
22
23         # Use the correct host in redirects
24         Header edit Location "^/" "https://manpages.debian.org/"
25
26         <Location />
27                 ProxyPass "http://localhost:2431/"
28                 ProxyPassReverse "http://localhost:2431/"
29         </Location>
30 </VirtualHost>
31
32 # vim:set syn=apache: