]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dev/templates/default/apache.user.erb
Disable cgiwrap support on errol
[chef.git] / cookbooks / dev / templates / default / apache.user.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 WSGIDaemonProcess <%= @user %>.dev.openstreetmap.org user=<%= @user %> inactivity-timeout=600
4
5 <VirtualHost *:80>
6         ServerName <%= @user %>.dev.openstreetmap.org
7         ServerAdmin webmaster@openstreetmap.org
8         ServerAlias <%= @user %>.dev.osm.org
9
10         # Remove Proxy request header to mitigate https://httpoxy.org/
11         RequestHeader unset Proxy early
12
13         UseCanonicalName Off
14         DocumentRoot <%= @directory %>
15         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
16
17         WSGIProcessGroup <%= @user %>.dev.openstreetmap.org
18
19         RewriteEngine on
20         #LogLevel rewrite:trace2
21
22         CustomLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-access.log combined
23         ErrorLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-error.log
24
25 #       RewriteCond <%= @directory %>%{REQUEST_FILENAME} -f
26 #       RewriteRule ^/cgi-bin/(.*)$ /cgi-bin/cgiwrap/~<%= @user %>/cgi-bin/$1 [PT,L]
27
28 #       RewriteCond <%= @directory %>%{REQUEST_FILENAME} -f
29 #       RewriteRule ^/cgi-bin-d/(.*)$ /cgi-bin/cgiwrapd/~<%= @user %>/cgi-bin/$1 [PT,L]
30
31         RewriteCond <%= @directory %>%{REQUEST_FILENAME} -f
32         RewriteRule ^/(.*\.ph(p|ps|p3|tml)(/.*)?)$ fcgi://127.0.0.1:<%= @port %><%= @directory %>/$1 [P]
33 </VirtualHost>
34
35 <Directory <%= @directory %>>
36         AllowOverride AuthConfig FileInfo Indexes Options=RailsBaseURI
37         Options SymLinksIfOwnerMatch Indexes Includes
38         Require all granted
39 </Directory>
40
41 <Directory <%= @directory %>/wsgi-bin>
42         SetHandler wsgi-script
43         Options ExecCGI SymLinksIfOwnerMatch
44         Require all granted
45 </Directory>