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
34 <% if @ssl_certificate -%>
35 SSLCertificateChainFile /etc/ssl/certs/<%= @ssl_certificate_chain %>.pem
38 CustomLog /var/log/apache2/<%= @name %>-access.log combined
39 ErrorLog /var/log/apache2/<%= @name %>-error.log
42 DocumentRoot <%= @directory %>
43 <% @urls.each do |url,directory| -%>
44 Alias <%= url %> <%= directory %>
47 php_admin_value open_basedir <%= @directory %>/:/usr/share/php/:/tmp/
48 php_admin_value disable_functions "exec,shell_exec,system,passthru,popen,proc_open"
49 php_value upload_max_filesize 70M
50 php_value post_max_size 100M
52 <Directory <%= @directory %>>
55 RewriteRule ^wp-admin/includes/ - [F,L]
56 RewriteRule !^wp-includes/ - [S=3]
57 RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
58 RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
59 RewriteRule ^wp-includes/theme-compat/ - [F,L]
60 RewriteRule ^readme\.html$ [F,L]
61 RewriteCond %{REQUEST_FILENAME} !-f
62 RewriteCond %{REQUEST_FILENAME} !-d
63 RewriteRule . /index.php [L]
66 AllowOverride AuthConfig
71 <Files <%= @directory %>/wp-config.php>
75 <Directory <%= @directory %>/uploads>
77 AddType text/plain .html .htm .shtml
78 php_admin_flag engine off
89 <Files ~ "\.(txt|md)$">