1 # DO NOT EDIT - This file is being maintained by Chef
3 WSGIDaemonProcess <%= @user %>.dev.openstreetmap.org user=<%= @user %> processes=2 threads=8 restart-interval=3600 inactivity-timeout=600 graceful-timeout=60 maximum-requests=2000
6 ServerName <%= @user %>.dev.openstreetmap.org
7 ServerAdmin webmaster@openstreetmap.org
8 ServerAlias <%= @user %>.dev.osm.org
11 SSLCertificateFile /etc/ssl/certs/<%= @user %>.dev.openstreetmap.org.pem
12 SSLCertificateKeyFile /etc/ssl/private/<%= @user %>.dev.openstreetmap.org.key
14 # Remove Proxy request header to mitigate https://httpoxy.org/
15 RequestHeader unset Proxy early
18 DocumentRoot <%= @directory %>
19 ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
21 WSGIProcessGroup <%= @user %>.dev.openstreetmap.org
24 #LogLevel rewrite:trace2
26 CustomLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-access.log combined_extended
27 ErrorLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-error.log
29 RewriteCond <%= @directory %>%{REQUEST_FILENAME} -f
30 RewriteRule ^/cgi-bin/(.*)$ /~<%= @user %>/cgi-bin/$1 [PT,L]
32 <FilesMatch ".+\.ph(p|ps|p3|tml)$">
33 SetHandler "proxy:unix:/run/php/php-<%= @user %>-fpm.sock|fcgi://127.0.0.1"
38 ServerName <%= @user %>.dev.openstreetmap.org
39 ServerAdmin webmaster@openstreetmap.org
40 ServerAlias <%= @user %>.dev.osm.org
42 CustomLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-access.log combined_extended
43 ErrorLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-error.log
45 RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
46 RedirectPermanent / https://<%= @user %>.dev.openstreetmap.org/
49 <Directory <%= @directory %>>
50 AllowOverride AuthConfig FileInfo Indexes Options=RailsBaseURI
51 Options SymLinksIfOwnerMatch Indexes Includes
55 <Directory <%= @directory %>/cgi-bin>
57 Options ExecCGI SymLinksIfOwnerMatch
61 <Directory <%= @directory %>/wsgi-bin>
62 SetHandler wsgi-script
63 Options ExecCGI SymLinksIfOwnerMatch