]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/dev/templates/default/apache.phppgadmin.erb
Add IPv6 addresses to dulcy
[chef.git] / cookbooks / dev / templates / default / apache.phppgadmin.erb
index e2d8556f7ad0b362cc4c8c4df8cd4ee16d799ca1..546a05cbee3c45605f9f42cc9620943252c4ec5d 100644 (file)
@@ -1,20 +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
 
-       CustomLog /var/log/apache2/phppgadmin.dev.openstreetmap.org-access.log combined
+       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_extended
        ErrorLog /var/log/apache2/phppgadmin.dev.openstreetmap.org-error.log
 
        DocumentRoot /usr/share/phppgadmin
 
-       <IfModule mod_fastcgi_handler.c>
-               <FilesMatch "\.ph(p3?|tml)$">
-                       SetHandler fcgi:/var/run/php5-fpm-default.sock
-               </FilesMatch>
-               <FilesMatch "\.phps$">
-                       SetHandler fcgi:/var/run/php5-fpm-default.sock
-               </FilesMatch>
-       </IfModule>
+       # Remove Proxy request header to mitigate https://httpoxy.org/
+       RequestHeader unset Proxy early
+
+       ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/run/php/php-default-fpm.sock|fcgi://127.0.0.1
+       ProxyPassMatch ^/(.*\.phpx(/.*)?)$ unix:/run/php/php-default-fpm.sock|fcgi://127.0.0.1
+       ProxyPassMatch ^/(.*\.phpj(/.*)?)$ unix:/run/php/php-default-fpm.sock|fcgi://127.0.0.1
+</VirtualHost>
+
+<VirtualHost *:80>
+       ServerName phppgadmin.dev.openstreetmap.org
+       ServerAdmin webmaster@openstreetmap.org
+
+       CustomLog /var/log/apache2/phppgadmin.dev.openstreetmap.org-access.log combined_extended
+       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>