]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/forum/templates/default/apache.erb
community: Add missing atom file
[chef.git] / cookbooks / forum / templates / default / apache.erb
index 0eea9db34beaa007ec453b726ad270ac53612674..5235ee1f8378ed57298626f62c8be9c26e4b541e 100644 (file)
@@ -8,7 +8,22 @@
        CustomLog /var/log/apache2/forum.openstreetmap.org-access.log combined
        ErrorLog /var/log/apache2/forum.openstreetmap.org-error.log
 
-       DocumentRoot /srv/forum.openstreetmap.org/html/
+       RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+       RedirectPermanent / https://forum.openstreetmap.org/
+</VirtualHost>
+
+<VirtualHost *:443>
+       ServerAlias forum.osm.org
+       ServerAdmin webmaster@openstreetmap.org
+
+       SSLEngine on
+       SSLCertificateFile /etc/ssl/certs/forum.openstreetmap.org.pem
+       SSLCertificateKeyFile /etc/ssl/private/forum.openstreetmap.org.key
+
+       CustomLog /var/log/apache2/forum.openstreetmap.org-access.log combined
+       ErrorLog /var/log/apache2/forum.openstreetmap.org-error.log
+
+       RedirectPermanent / https://forum.openstreetmap.org/
 </VirtualHost>
 
 <VirtualHost *:443>
        ServerAdmin webmaster@openstreetmap.org
 
        SSLEngine on
-       SSLProtocol all -SSLv2
-       SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
-       SSLCertificateFile /etc/ssl/certs/openstreetmap.pem
-       SSLCertificateKeyFile /etc/ssl/private/openstreetmap.key
+       SSLCertificateFile /etc/ssl/certs/forum.openstreetmap.org.pem
+       SSLCertificateKeyFile /etc/ssl/private/forum.openstreetmap.org.key
 
        CustomLog /var/log/apache2/forum.openstreetmap.org-access.log combined
        ErrorLog /var/log/apache2/forum.openstreetmap.org-error.log
 
-       DocumentRoot /srv/forum.openstreetmap.org
+       DocumentRoot /srv/forum.openstreetmap.org/html
+
+       <FilesMatch ".+\.ph(ar|p|tml)$">
+               SetHandler "proxy:unix:/run/php/php-forum.openstreetmap.org-fpm.sock|fcgi://127.0.0.1"
+       </FilesMatch>
 </VirtualHost>
+
+<Directory /srv/forum.openstreetmap.org/html>
+       RewriteEngine on
+       RewriteRule ^config\.php$ - [F,L]
+
+       Options -Indexes
+
+       Require all granted
+</Directory>
+
+<Directory /srv/forum.openstreetmap.org/html/img>
+       <FilesMatch ".+\.ph(ar|p|tml)$">
+               SetHandler None
+       </FilesMatch>
+</Directory>