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 RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
15 RedirectPermanent / https://<%= @name %>/
19 ServerName <%= @name %>
20 <% @aliases.each do |alias_name| -%>
21 ServerAlias <%= alias_name %>
23 ServerAdmin webmaster@openstreetmap.org
26 SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
27 SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
29 CustomLog /var/log/apache2/<%= @name %>-access.log combined
30 ErrorLog /var/log/apache2/<%= @name %>-error.log
33 DocumentRoot <%= @directory %>
34 <% @urls.each do |url,directory| -%>
35 Alias <%= url %> <%= directory %>
36 <Directory <%= directory %>>
38 php_admin_flag engine off
43 php_admin_value open_basedir <%= @directory %>/:/usr/share/php/:/tmp/
44 php_admin_value disable_functions "exec,shell_exec,system,passthru,popen,proc_open"
45 php_value upload_max_filesize 70M
46 php_value post_max_size 100M
48 <Directory <%= @directory %>>
51 RewriteRule ^wp-admin/includes/ - [F,L]
52 RewriteRule !^wp-includes/ - [S=3]
53 RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
54 RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
55 RewriteRule ^wp-includes/theme-compat/ - [F,L]
56 RewriteRule ^readme\.html$ [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
85 <Files ~ "\.(txt|md)$">