]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/dev/templates/default/apache.phppgadmin.erb
Merge remote-tracking branch 'github/pull/193'
[chef.git] / cookbooks / dev / templates / default / apache.phppgadmin.erb
index b6a7f9197284ee5de56b7ca83464cac08a97471f..ec74a54da0638f99f47468e88f2822b858e2c4c8 100644 (file)
@@ -1,15 +1,37 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
-<VirtualHost *:80>
+<VirtualHost *:443>
        ServerName phppgadmin.dev.openstreetmap.org
        ServerAdmin webmaster@openstreetmap.org
 
+       SSLEngine on
+       SSLCertificateFile /etc/ssl/certs/phppgadmin.dev.openstreetmap.org.pem
+       SSLCertificateKeyFile /etc/ssl/private/phppgadmin.dev.openstreetmap.org.key
+
        CustomLog /var/log/apache2/phppgadmin.dev.openstreetmap.org-access.log combined
        ErrorLog /var/log/apache2/phppgadmin.dev.openstreetmap.org-error.log
 
        DocumentRoot /usr/share/phppgadmin
 
+       # Remove Proxy request header to mitigate https://httpoxy.org/
+       RequestHeader unset Proxy early
+
        ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:7000/usr/share/phppgadmin
        ProxyPassMatch ^/(.*\.phpx(/.*)?)$ fcgi://127.0.0.1:7000/usr/share/phppgadmin
        ProxyPassMatch ^/(.*\.phpj(/.*)?)$ fcgi://127.0.0.1:7000/usr/share/phppgadmin
 </VirtualHost>
+
+<VirtualHost *:80>
+       ServerName phppgadmin.dev.openstreetmap.org
+       ServerAdmin webmaster@openstreetmap.org
+
+       CustomLog /var/log/apache2/phppgadmin.dev.openstreetmap.org-access.log combined
+       ErrorLog /var/log/apache2/phppgadmin.dev.openstreetmap.org-error.log
+
+       RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+       RedirectPermanent / https://phppgadmin.dev.openstreetmap.org/
+</VirtualHost>
+
+<Directory /usr/share/phppgadmin>
+       Require all granted
+</Directory>