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 %>
40 php_admin_value open_basedir <%= @directory %>/:/usr/share/php/:/tmp/
41 php_admin_value disable_functions "exec,shell_exec,system,passthru,popen,proc_open"
42 php_value upload_max_filesize 70M
43 php_value post_max_size 100M
45 <Directory <%= @directory %>>
48 RewriteRule ^wp-admin/includes/ - [F,L]
49 RewriteRule !^wp-includes/ - [S=3]
50 RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
51 RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
52 RewriteRule ^wp-includes/theme-compat/ - [F,L]
53 RewriteRule ^readme\.html$ [F,L]
54 RewriteCond %{REQUEST_FILENAME} !-f
55 RewriteCond %{REQUEST_FILENAME} !-d
56 RewriteRule . /index.php [L]
59 AllowOverride AuthConfig
64 <Files <%= @directory %>/wp-config.php>
68 <Directory <%= @directory %>/uploads>
70 AddType text/plain .html .htm .shtml
71 php_admin_flag engine off
82 <Files ~ "\.(txt|md)$">