]> git.openstreetmap.org Git - chef.git/blob - cookbooks/osqa/templates/default/apache.erb
Switch help.osm.org to letsencrypt
[chef.git] / cookbooks / osqa / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 WSGIDaemonProcess <%= @name %> user=<%= @user %> group=<%= @group %> processes=4 threads=4
4
5 <VirtualHost *:80>
6         ServerName <%= @name %>
7         ServerAdmin webmaster@openstreetmap.org
8
9         CustomLog /var/log/apache2/<%= @name %>-access.log combined
10         ErrorLog /var/log/apache2/<%= @name %>-error.log
11
12         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
13         RedirectPermanent / https://<%= @name %>/
14 </VirtualHost>
15
16 <VirtualHost *:443>
17         ServerName <%= @name %>
18         ServerAdmin webmaster@openstreetmap.org
19
20         SSLEngine on
21         SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
22         SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
23
24         CustomLog /var/log/apache2/<%= @name %>-access.log combined
25         ErrorLog /var/log/apache2/<%= @name %>-error.log
26
27         DocumentRoot <%= @directory %>/osqa
28         Alias /m/ <%= @directory %>/osqa/forum/skins/
29         Alias /upfiles/ <%= @directory %>/upfiles/
30         Alias /admin_media/ /usr/share/pyshared/django/contrib/admin/media/
31         WSGIScriptAlias / <%= @directory %>/osqa/osqa.wsgi
32
33         WSGIProcessGroup <%= @name %>
34 </VirtualHost>
35
36 <Directory <%= @directory %>/osqa>
37         Require all granted
38 </Directory>
39
40 <Directory <%= @directory %>/upfiles>
41         Require all granted
42 </Directory>