From 33cf7e313cf9dfa2e5ac0e8eeb91cacb016ebe62 Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 27 Jan 2016 21:03:58 +0100 Subject: [refactor] Optimize static apache vhost templates - Related: #7853 --- puppet/modules/site_static/templates/amber.erb | 10 ++-------- puppet/modules/site_static/templates/rack.erb | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/puppet/modules/site_static/templates/amber.erb b/puppet/modules/site_static/templates/amber.erb index 17dc2ad6..48df555e 100644 --- a/puppet/modules/site_static/templates/amber.erb +++ b/puppet/modules/site_static/templates/amber.erb @@ -1,15 +1,9 @@ -<%- if @location_path == '' -%> - /"> - AllowOverride FileInfo Indexes Options=All,MultiViews - Order deny,allow - Allow from all - -<%- else -%> +<%- if @location_path != '' -%> AliasMatch ^/[a-z]{2}/<%=@location_path%>(/.+|/|)$ "<%=@directory%>/$1" Alias /<%=@location_path%> "<%=@directory%>/" +<%- end -%> /"> AllowOverride FileInfo Indexes Options=All,MultiViews Order deny,allow Allow from all -<%- end -%> diff --git a/puppet/modules/site_static/templates/rack.erb b/puppet/modules/site_static/templates/rack.erb index aae91f1c..d70d3ddb 100644 --- a/puppet/modules/site_static/templates/rack.erb +++ b/puppet/modules/site_static/templates/rack.erb @@ -1,21 +1,15 @@ #PassengerLogLevel 1 #PassengerAppEnv production #PassengerFriendlyErrorPages on -<%- if @location_path == '' -%> - "> - Order deny,allow - Allow from all - Options -MultiViews - -<%- else -%> +<%- if @location_path != '' -%> Alias /<%=@location_path%> "<%=@directory%>" > PassengerBaseURI /<%=@location_path%> PassengerAppRoot "<%=File.dirname(@directory)%>" +<%- end -%> "> Order deny,allow Allow from all Options -MultiViews -<%- end -%> -- cgit v1.2.3