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 %>>
39 <FilesMatch ".+\.ph(ar|p|tml)$">
45 ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=<%= @directory %>/:/usr/share/php/:/tmp/\ndisable_functions=exec,shell_exec,system,passthru,popen,proc_open"
46 ProxyFCGISetEnvIf "true" PHP_VALUE "upload_max_filesize=70M\npost_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 <FilesMatch ".+\.ph(ar|p|tml)$">
87 <Files ~ "\.(txt|md)$">