]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dev/templates/default/apache.user.erb
Install wkhtmltopdf for civicrm
[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         UseCanonicalName Off
11         DocumentRoot <%= @directory %>
12         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
13
14         WSGIProcessGroup <%= @user %>.dev.openstreetmap.org
15
16         RewriteEngine on
17         #RewriteLog /var/log/apache2/rewrite.log
18         #RewriteLogLevel 4
19
20         CustomLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-access.log combined
21         ErrorLog /var/log/apache2/<%= @user %>.dev.openstreetmap.org-error.log
22
23         RewriteCond <%= @directory %>%{REQUEST_FILENAME} -f
24         RewriteRule ^/cgi-bin/(.*)$ /cgi-bin/cgiwrap/~<%= @user %>/cgi-bin/$1 [PT,L]
25
26         RewriteCond <%= @directory %>%{REQUEST_FILENAME} -f
27         RewriteRule ^/cgi-bin-d/(.*)$ /cgi-bin/cgiwrapd/~<%= @user %>/cgi-bin/$1 [PT,L]
28
29         <IfModule mod_fastcgi_handler.c>
30                 <FilesMatch "\.ph(p3?|tml)$">
31                         SetHandler fcgi:/var/run/php5-fpm-<%= @user %>.sock
32                 </FilesMatch>
33                 <FilesMatch "\.phps$">
34                         SetHandler fcgi:/var/run/php5-fpm-<%= @user %>.sock
35                 </FilesMatch>
36         </IfModule>
37
38         <IfModule !mod_fastcgi_handler.c>
39                 RewriteCond <%= @directory %>%{REQUEST_FILENAME} -f
40                 RewriteRule ^(.*\.php)$ /cgi-bin/php-cgiwrap/~<%= @user %>/$1 [PT,L]
41         </IfModule>
42 </VirtualHost>
43
44 <Directory <%= @directory %>>
45         AllowOverride AuthConfig FileInfo Indexes Options=RailsBaseURI
46         Options SymLinksIfOwnerMatch Indexes Includes
47 </Directory>
48
49 <Directory <%= @directory %>/wsgi-bin>
50         SetHandler wsgi-script
51         Options ExecCGI SymLinksIfOwnerMatch
52 </Directory>