]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dev/templates/default/apache.dev.erb
Merge remote-tracking branch 'tigerfell/pr257'
[chef.git] / cookbooks / dev / templates / default / apache.dev.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:443>
4         ServerName dev.openstreetmap.org
5         ServerAdmin webmaster@openstreetmap.org
6
7         SSLEngine on
8         SSLCertificateFile /etc/ssl/certs/dev.openstreetmap.org.pem
9         SSLCertificateKeyFile /etc/ssl/private/dev.openstreetmap.org.key
10
11         CustomLog /var/log/apache2/dev.openstreetmap.org-access.log combined
12         ErrorLog /var/log/apache2/dev.openstreetmap.org-error.log
13
14         DocumentRoot /srv/dev.openstreetmap.org
15
16         RewriteEngine on
17         RewriteCond %{REQUEST_URI} ^/~([^/]*)(/.*)?$
18         RewriteCond /home/%1/public_html -d
19         RewriteRule ^/~([^/]*)(/.*)?$ https://$1.dev.openstreetmap.org$2 [NS,R=307]
20 </VirtualHost>
21
22 <VirtualHost *:80>
23         ServerName dev.openstreetmap.org
24         ServerAdmin webmaster@openstreetmap.org
25
26         CustomLog /var/log/apache2/dev.openstreetmap.org-access.log combined
27         ErrorLog /var/log/apache2/dev.openstreetmap.org-error.log
28
29         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
30         RedirectPermanent / https://dev.openstreetmap.org/
31 </VirtualHost>
32
33 <Directory /srv/dev.openstreetmap.org>
34         Require all granted
35 </Directory>