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.erb10
-rw-r--r--puppet/modules/site_static/templates/rack.erb10
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 -%>