]> git.openstreetmap.org Git - chef.git/blob - cookbooks/trac/templates/default/apache.erb
Don't try and fallback to alternate caches
[chef.git] / cookbooks / trac / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 WSGIDaemonProcess <%= @name %> user=<%= @user %> group=<%= @group %> maximum-requests=5000 threads=25 inactivity-timeout=180
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 %>/htdocs
28         Alias /robots.txt <%= @directory %>/htdocs/site/robots.txt
29         WSGIScriptAlias / <%= @directory %>/cgi-bin/trac.wsgi
30
31         WSGIProcessGroup <%= @name %>
32
33         DefineExternalAuth osm pipe /usr/local/bin/trac-authenticate
34
35         <Location /login>
36                 AuthType Basic
37                 AuthName "OpenStreetMap Trac"
38                 AuthBasicProvider external
39                 AuthExternal osm
40                 Require valid-user
41         </Location>
42 </VirtualHost>
43
44 <Directory <%= @directory %>/htdocs>
45         Require all granted
46 </Directory>
47
48 <Directory <%= @directory %>/cgi-bin>
49         Require all granted
50 </Directory>