]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/stats/templates/default/apache.erb
Add role for rhaegal
[chef.git] / cookbooks / stats / templates / default / apache.erb
index d6e1470574ef628b52c8b8991830b5d10204f216..47a589afdcfc9a019df9ac7cf431afd81a7e7acd 100644 (file)
@@ -1,6 +1,6 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
 # DO NOT EDIT - This file is being maintained by Chef
 
-<VirtualHost *:80>
+<VirtualHost *:443>
        ServerName stats.openstreetmap.org
        ServerAlias stats.osm.org
        ServerAdmin webmaster@openstreetmap.org
        ServerName stats.openstreetmap.org
        ServerAlias stats.osm.org
        ServerAdmin webmaster@openstreetmap.org
@@ -8,11 +8,33 @@
        CustomLog /var/log/apache2/stats.openstreetmap.org-access.log combined
        ErrorLog /var/log/apache2/stats.openstreetmap.org-error.log
 
        CustomLog /var/log/apache2/stats.openstreetmap.org-access.log combined
        ErrorLog /var/log/apache2/stats.openstreetmap.org-error.log
 
+       SSLEngine on
+       SSLCertificateFile /etc/ssl/certs/stats.openstreetmap.org.pem
+       SSLCertificateKeyFile /etc/ssl/private/stats.openstreetmap.org.key
+
        DocumentRoot <%= @directory %>
        Alias /awstats-icon/ /usr/share/awstats/icon/
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
 </VirtualHost>
 
        DocumentRoot <%= @directory %>
        Alias /awstats-icon/ /usr/share/awstats/icon/
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
 </VirtualHost>
 
+<VirtualHost *:80>
+       ServerName stats.openstreetmap.org
+       ServerAlias stats.osm.org
+       ServerAdmin webmaster@openstreetmap.org
+
+       CustomLog /var/log/apache2/stats.openstreetmap.org-access.log combined
+       ErrorLog /var/log/apache2/stats.openstreetmap.org-error.log
+
+       RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+       RedirectPermanent / https://stats.openstreetmap.org/
+</VirtualHost>
+
+<Directory <%= @directory %>>
+       Options None
+       AllowOverride None
+       Require all granted
+</Directory>
+
 <Directory /var/lib/awstats>
        Options None
        AllowOverride None
 <Directory /var/lib/awstats>
        Options None
        AllowOverride None