1 # DO NOT EDIT - This file is being maintained by Chef
4 ServerName <%= @name %>
5 <% @aliases.each do |alias_name| -%>
6 ServerAlias <%= alias_name %>
9 ServerAdmin webmaster@openstreetmap.org
11 CustomLog /var/log/apache2/<%= @name %>-access.log combined
12 ErrorLog /var/log/apache2/<%= @name %>-error.log
14 <% if @ssl_enabled -%>
15 RedirectPermanent / https://<%= @name %>/
19 ServerName <%= @name %>
20 <% @aliases.each do |alias_name| -%>
21 ServerAlias <%= alias_name %>
24 ServerAdmin webmaster@openstreetmap.org
30 <% if @ssl_certificate -%>
31 SSLCertificateFile /etc/ssl/certs/<%= @ssl_certificate %>.pem
32 SSLCertificateKeyFile /etc/ssl/private/<%= @ssl_certificate %>.key
35 CustomLog /var/log/apache2/<%= @name %>-access.log combined
36 ErrorLog /var/log/apache2/<%= @name %>-error.log
39 DocumentRoot <%= @directory %>
40 <% @urls.each do |url,directory| -%>
41 Alias <%= url %> <%= directory %>
44 php_admin_value open_basedir <%= @directory %>/:/usr/share/php/:/tmp/
45 php_admin_value disable_functions "exec,shell_exec,system,passthru,popen,proc_open"
46 php_value upload_max_filesize 70M
47 php_value post_max_size 100M
49 <Directory <%= @directory %>>
52 RewriteRule ^wp-admin/includes/ - [F,L]
53 RewriteRule !^wp-includes/ - [S=3]
54 RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
55 RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
56 RewriteRule ^wp-includes/theme-compat/ - [F,L]
57 RewriteCond %{REQUEST_FILENAME} !-f
58 RewriteCond %{REQUEST_FILENAME} !-d
59 RewriteRule . /index.php [L]
62 AllowOverride AuthConfig
67 <Files <%= @directory %>/wp-config.php>
71 <Directory <%= @directory %>/uploads>
73 AddType text/plain .html .htm .shtml
74 php_admin_flag engine off