diff options
author | varac <varacanero@zeromail.org> | 2016-01-27 21:03:58 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-01-27 21:03:58 +0100 |
commit | 33cf7e313cf9dfa2e5ac0e8eeb91cacb016ebe62 (patch) | |
tree | bc6c7f75b4556d86c044452b412931436968efdf /puppet | |
parent | 01b05ec8453b44d93780e04dd832b9a0e7b3cd48 (diff) |
[refactor] Optimize static apache vhost templates
- Related: #7853
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/modules/site_static/templates/amber.erb | 10 | ||||
-rw-r--r-- | 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 == '' -%> - <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 Order deny,allow Allow from all </Directory> -<%- 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 == '' -%> - <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%>"> Order deny,allow Allow from all Options -MultiViews </Directory> -<%- end -%> |