X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/93088ecf5f09c8d7383fccd4aa06fcf44cb4691a..4a9eb655d873ad80e9ada63056405c98c7a3e7b0:/cookbooks/wordpress/templates/default/apache.erb?ds=inline diff --git a/cookbooks/wordpress/templates/default/apache.erb b/cookbooks/wordpress/templates/default/apache.erb index 90adc23a2..200c50089 100644 --- a/cookbooks/wordpress/templates/default/apache.erb +++ b/cookbooks/wordpress/templates/default/apache.erb @@ -11,25 +11,32 @@ CustomLog /var/log/apache2/<%= @name %>-access.log combined ErrorLog /var/log/apache2/<%= @name %>-error.log - <% if @ssl_enabled -%> - RedirectPermanent / https://<%= @name %>/ - - - ServerName <%= @name %> - <% @aliases.each do |alias_name| -%> - ServerAlias <%= alias_name %> - <% end -%> - - ServerAdmin webmaster@openstreetmap.org - - # - # Enable SSL - # - SSLEngine on - - CustomLog /var/log/apache2/<%= @name %>-access.log combined - ErrorLog /var/log/apache2/<%= @name %>-error.log + RedirectPermanent / https://<%= @name %>/ + + + + ServerName <%= @name %> +<% @aliases.each do |alias_name| -%> + ServerAlias <%= alias_name %> +<% end -%> + + ServerAdmin webmaster@openstreetmap.org + + # + # Enable SSL + # + SSLEngine on +<% if @ssl_certificate -%> + SSLCertificateFile /etc/ssl/certs/<%= @ssl_certificate %>.pem + SSLCertificateKeyFile /etc/ssl/private/<%= @ssl_certificate %>.key +<% end -%> +<% if @ssl_certificate -%> + SSLCertificateChainFile /etc/ssl/certs/<%= @ssl_certificate_chain %>.pem +<% end -%> + + CustomLog /var/log/apache2/<%= @name %>-access.log combined + ErrorLog /var/log/apache2/<%= @name %>-error.log <% end -%> DocumentRoot <%= @directory %> @@ -50,15 +57,19 @@ RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] RewriteRule ^wp-includes/theme-compat/ - [F,L] + RewriteRule ^readme\.html$ [F,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] + Options -Indexes + AllowOverride AuthConfig + + Require all granted /wp-config.php> - Order allow,deny - Deny from all + Require all denied /uploads> @@ -68,17 +79,18 @@ - Order allow,deny - Deny from all + Require all denied - Order allow,deny - Deny from all + Require all denied + + Require all denied + + - Order allow,deny - Deny from all + Require all denied