1 # DO NOT EDIT - This file is being maintained by Chef
3 WSGIDaemonProcess <%= @user %>.dev.openstreetmap.org user=<%= @user %> inactivity-timeout=600
6 ServerName <%= @user %>.dev.openstreetmap.org
7 ServerAdmin webmaster@openstreetmap.org
8 ServerAlias <%= @user %>.dev.osm.org
10 # Remove Proxy request header to mitigate https://httpoxy.org/
11 RequestHeader unset Proxy early
14 DocumentRoot <%= @directory %>
15 ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
17 WSGIProcessGroup <%= @user %>.dev.openstreetmap.org
20 #LogLevel rewrite:trace2
22 CustomLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-access.log combined
23 ErrorLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-error.log
25 RewriteCond <%= @directory %>%{REQUEST_FILENAME} -f
26 RewriteRule ^/cgi-bin/(.*)$ /~<%= @user %>/cgi-bin/$1 [PT,L]
28 RewriteCond <%= @directory %>%{REQUEST_FILENAME} -f
29 RewriteRule ^/(.*\.ph(p|ps|p3|tml)(/.*)?)$ fcgi://127.0.0.1:<%= @port %><%= @directory %>/$1 [P]
32 <Directory <%= @directory %>>
33 AllowOverride AuthConfig FileInfo Indexes Options=RailsBaseURI
34 Options SymLinksIfOwnerMatch Indexes Includes
38 <Directory <%= @directory %>/cgi-bin>
40 Options ExecCGI SymLinksIfOwnerMatch
44 <Directory <%= @directory %>/wsgi-bin>
45 SetHandler wsgi-script
46 Options ExecCGI SymLinksIfOwnerMatch