]> git.openstreetmap.org Git - chef.git/blob - cookbooks/trac/templates/default/apache.erb
Use http for all backend requests
[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 / https://<%= @name %>/
13 </VirtualHost>
14
15 <VirtualHost *:443>
16         ServerName <%= @name %>
17         ServerAdmin webmaster@openstreetmap.org
18
19         SSLEngine on
20
21         CustomLog /var/log/apache2/<%= @name %>-access.log combined
22         ErrorLog /var/log/apache2/<%= @name %>-error.log
23
24         DocumentRoot <%= @directory %>/htdocs
25         Alias /robots.txt <%= @directory %>/htdocs/site/robots.txt
26         WSGIScriptAlias / <%= @directory %>/cgi-bin/trac.wsgi
27
28         WSGIProcessGroup <%= @name %>
29
30         DefineExternalAuth osm pipe /usr/local/bin/trac-authenticate
31
32         <Location /login>
33                 AuthType Basic
34                 AuthName "OpenStreetMap Trac"
35                 AuthBasicProvider external
36                 AuthExternal osm
37                 Require valid-user
38         </Location>
39 </VirtualHost>
40
41 <Directory <%= @directory %>/htdocs>
42         Require all granted
43 </Directory>
44
45 <Directory <%= @directory %>/cgi-bin>
46         Require all granted
47 </Directory>