1 # DO NOT EDIT - This file is being maintained by Chef
3 WSGIDaemonProcess <%= @name %> user=<%= @user %> group=<%= @group %> processes=4 threads=8 restart-interval=3600 inactivity-timeout=600 graceful-timeout=60 maximum-requests=2000 python-home=<%= @python_home %>
6 ServerName <%= @name %>
7 <% @aliases.each do |alias_name| -%>
8 ServerAlias <%= alias_name %>
10 ServerAdmin webmaster@openstreetmap.org
12 CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
13 ErrorLog /var/log/apache2/<%= @name %>-error.log
15 RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
16 RedirectPermanent / https://<%= @name %>/
18 <% unless @aliases.empty? -%>
21 ServerName <%= @aliases.first %>
22 <% @aliases.drop(1).each do |alias_name| -%>
23 ServerAlias <%= alias_name %>
25 ServerAdmin webmaster@openstreetmap.org
28 SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
29 SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
31 CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
32 ErrorLog /var/log/apache2/<%= @name %>-error.log
34 RedirectPermanent / https://<%= @name %>/
39 ServerName <%= @name %>
40 ServerAdmin webmaster@openstreetmap.org
43 SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
44 SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
46 CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
47 ErrorLog /var/log/apache2/<%= @name %>-error.log
49 DocumentRoot <%= @directory %>/osqa
50 Alias /m/ <%= @directory %>/osqa/forum/skins/
51 Alias /upfiles/ <%= @directory %>/upfiles/
52 Alias /admin_media/ /usr/share/pyshared/django/contrib/admin/media/
53 WSGIScriptAlias / <%= @directory %>/osqa/osqa.wsgi
55 WSGIProcessGroup <%= @name %>
57 # Site is now closed. Block access to login page and other pages.
60 ErrorDocument 403 "help.openstreetmap.org is closed. Use community.openstreetmap.org instead."
62 <Location /questions/ask/>
64 ErrorDocument 403 "help.openstreetmap.org is closed. Use community.openstreetmap.org instead."
67 RewriteCond %{REQUEST_METHOD} POST
68 RewriteRule ^/questions - [F,NC]
71 <Directory <%= @directory %>/osqa>
75 <Directory <%= @directory %>/upfiles>