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 /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
16 RedirectPermanent / https://<%= @name %>/
20 ServerName <%= @name %>
21 <% @aliases.each do |alias_name| -%>
22 ServerAlias <%= alias_name %>
25 ServerAdmin webmaster@openstreetmap.org
28 SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
29 SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
31 CustomLog /var/log/apache2/<%= @name %>-access.log combined
32 ErrorLog /var/log/apache2/<%= @name %>-error.log
35 DocumentRoot <%= @directory %>
36 <% @urls.each do |url,directory| -%>
37 Alias <%= url %> <%= directory %>
38 <Directory <%= directory %>>
40 php_admin_flag engine off
45 php_admin_value open_basedir <%= @directory %>/:/usr/share/php/:/tmp/
46 php_admin_value disable_functions "exec,shell_exec,system,passthru,popen,proc_open"
47 php_value upload_max_filesize 70M
48 php_value post_max_size 100M
50 <Directory <%= @directory %>>
53 RewriteRule ^wp-admin/includes/ - [F,L]
54 RewriteRule !^wp-includes/ - [S=3]
55 RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
56 RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
57 RewriteRule ^wp-includes/theme-compat/ - [F,L]
58 RewriteRule ^readme\.html$ [F,L]
59 RewriteCond %{REQUEST_FILENAME} !-f
60 RewriteCond %{REQUEST_FILENAME} !-d
61 RewriteRule . /index.php [L]
64 AllowOverride AuthConfig
69 <Files <%= @directory %>/wp-config.php>
73 <Directory <%= @directory %>/uploads>
75 AddType text/plain .html .htm .shtml
76 php_admin_flag engine off
87 <Files ~ "\.(txt|md)$">