]> git.openstreetmap.org Git - chef.git/blob - cookbooks/stats/templates/default/apache.erb
Enable SSL for stats.osm.org
[chef.git] / cookbooks / stats / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:443>
4         ServerName stats.openstreetmap.org
5         ServerAlias stats.osm.org
6         ServerAdmin webmaster@openstreetmap.org
7
8         CustomLog /var/log/apache2/stats.openstreetmap.org-access.log combined
9         ErrorLog /var/log/apache2/stats.openstreetmap.org-error.log
10
11         SSLEngine on
12         SSLCertificateFile /etc/ssl/certs/stats.openstreetmap.org.pem
13         SSLCertificateKeyFile /etc/ssl/private/stats.openstreetmap.org.key
14
15         DocumentRoot <%= @directory %>
16         Alias /awstats-icon/ /usr/share/awstats/icon/
17         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
18 </VirtualHost>
19
20 <VirtualHost *:80>
21         ServerName stats.openstreetmap.org
22         ServerAlias stats.osm.org
23         ServerAdmin webmaster@openstreetmap.org
24
25         CustomLog /var/log/apache2/stats.openstreetmap.org-access.log combined
26         ErrorLog /var/log/apache2/stats.openstreetmap.org-error.log
27
28         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
29         RedirectPermanent / https://stats.openstreetmap.org/
30 </VirtualHost>
31
32 <Directory /var/lib/awstats>
33         Options None
34         AllowOverride None
35         Require all granted
36 </Directory>
37
38 <Directory /usr/share/awstats/icon>
39         Options None
40         AllowOverride None
41         Require all granted
42 </Directory>