summaryrefslogtreecommitdiff
path: root/puppet/modules/site_static/templates
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_static/templates')
-rw-r--r--puppet/modules/site_static/templates/amber.erb14
-rw-r--r--puppet/modules/site_static/templates/apache.conf.erb3
-rw-r--r--puppet/modules/site_static/templates/rack.erb16
3 files changed, 14 insertions, 19 deletions
diff --git a/puppet/modules/site_static/templates/amber.erb b/puppet/modules/site_static/templates/amber.erb
index 17dc2ad6..694f1136 100644
--- a/puppet/modules/site_static/templates/amber.erb
+++ b/puppet/modules/site_static/templates/amber.erb
@@ -1,15 +1,13 @@
-<%- if @location_path == '' -%>
- <Directory "<%= @directory %>/">
- AllowOverride FileInfo Indexes Options=All,MultiViews
- Order deny,allow
- Allow from all
- </Directory>
-<%- else -%>
+<%- if @location_path != '' -%>
AliasMatch ^/[a-z]{2}/<%=@location_path%>(/.+|/|)$ "<%=@directory%>/$1"
Alias /<%=@location_path%> "<%=@directory%>/"
+<%- end -%>
<Directory "<%=@directory%>/">
AllowOverride FileInfo Indexes Options=All,MultiViews
+<% if scope.function_guess_apache_version([]) == '2.4' %>
+ Require all granted
+<% else %>
Order deny,allow
Allow from all
+<% end %>
</Directory>
-<%- end -%>
diff --git a/puppet/modules/site_static/templates/apache.conf.erb b/puppet/modules/site_static/templates/apache.conf.erb
index 4d61cc08..6b969d1c 100644
--- a/puppet/modules/site_static/templates/apache.conf.erb
+++ b/puppet/modules/site_static/templates/apache.conf.erb
@@ -48,7 +48,7 @@
Include include.d/ssl_common.inc
<%- if @tls_only -%>
- Header add Strict-Transport-Security: "max-age=15768000;includeSubdomains"
+ Header always set Strict-Transport-Security: "max-age=15768000;includeSubdomains"
<%- end -%>
Header set X-Frame-Options "deny"
Header always unset X-Powered-By
@@ -56,7 +56,6 @@
SSLCertificateKeyFile /etc/x509/keys/<%= @domain %>.key
SSLCertificateFile /etc/x509/certs/<%= @domain %>.crt
- SSLCertificateChainFile /etc/ssl/certs/<%= @domain %>_ca.pem
RequestHeader set X_FORWARDED_PROTO 'https'
diff --git a/puppet/modules/site_static/templates/rack.erb b/puppet/modules/site_static/templates/rack.erb
index aae91f1c..431778bb 100644
--- a/puppet/modules/site_static/templates/rack.erb
+++ b/puppet/modules/site_static/templates/rack.erb
@@ -1,21 +1,19 @@
#PassengerLogLevel 1
#PassengerAppEnv production
#PassengerFriendlyErrorPages on
-<%- if @location_path == '' -%>
- <Directory "<%=@directory%>">
- Order deny,allow
- Allow from all
- Options -MultiViews
- </Directory>
-<%- else -%>
+<%- if @location_path != '' -%>
Alias /<%=@location_path%> "<%=@directory%>"
<Location /<%=@location_path%>>
PassengerBaseURI /<%=@location_path%>
PassengerAppRoot "<%=File.dirname(@directory)%>"
</Location>
+<%- end -%>
<Directory "<%=@directory%>">
+ Options -MultiViews
+<% if scope.function_guess_apache_version([]) == '2.4' %>
+ Require all granted
+<% else %>
Order deny,allow
Allow from all
- Options -MultiViews
+<% end %>
</Directory>
-<%- end -%>