Redirect forum.osm.org to forum.openstreetmap.org for https connections
authorTom Hughes <tom@compton.nu>
Thu, 2 May 2019 08:26:40 +0000 (09:26 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 2 May 2019 08:51:01 +0000 (09:51 +0100)
cookbooks/forum/templates/default/apache.erb

index ad7a36d35a06f226bb3b933d6b64a6e40374d337..e84f1e35b5e1e3b69873c4def075a1f1af20d0bf 100644 (file)
@@ -13,7 +13,6 @@
 </VirtualHost>
 
 <VirtualHost *:443>
-       ServerName forum.openstreetmap.org
        ServerAlias forum.osm.org
        ServerAdmin webmaster@openstreetmap.org
 
        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>
+       ServerName forum.openstreetmap.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
+
        DocumentRoot /srv/forum.openstreetmap.org/html
 
        php_admin_value open_basedir /srv/forum.openstreetmap.org/html/:/usr/share/php/:/tmp/