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 <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
63 <FilesMatch ".+\.ph(ar|p|tml)$">
64 SetHandler "proxy:unix:/run/php/<%= @name %>.sock|fcgi://127.0.0.1"
68 <Files <%= @directory %>/wp-config.php>
72 <Directory <%= @directory %>/uploads>
74 AddType text/plain .html .htm .shtml
75 <FilesMatch ".+\.ph(ar|p|tml)$">
88 <Files ~ "\.(txt|md)$">