give ProxyPassReverse a path
[mirror/dsa-puppet.git] / modules / salsa / templates / apache-salsa.debian.org.conf.erb
1 Use common-debian-service-https-redirect * salsa.debian.org
2
3 <VirtualHost *:443>
4         ServerName salsa.debian.org
5         ServerAdmin debian-admin@lists.debian.org
6
7         Use common-debian-service-ssl salsa.debian.org
8         Use common-ssl-HSTS
9         Use http-pkp-salsa.debian.org
10
11         ErrorLog /var/log/apache2/salsa.debian.org-error.log
12         CustomLog /var/log/apache2/salsa.debian.org-access.log privacy
13
14         DocumentRoot /srv/salsa.debian.org/gitlab/public
15
16         ProxyPreserveHost On
17         AllowEncodedSlashes NoDecode
18
19         ProxyPassReverse / http://127.0.0.1:8080/
20         ProxyPassReverse / http://salsa.debian.org/
21
22         RewriteEngine on
23         RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
24         RewriteCond %{REQUEST_URI} ^/uploads/.*
25         RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA,NE]
26
27         RequestHeader set X_FORWARDED_PROTO 'https'
28         RequestHeader set X-Forwarded-Ssl on
29
30         ErrorDocument 404 /404.html
31         ErrorDocument 422 /422.html
32         ErrorDocument 500 /500.html
33         ErrorDocument 502 /502.html
34         ErrorDocument 503 /503.html
35 </VirtualHost>
36
37 # vim:set syn=apache: