diff options
author | Micah Anderson <micah@leap.se> | 2014-11-04 20:28:46 -0500 |
---|---|---|
committer | Micah Anderson <micah@leap.se> | 2014-11-04 20:28:46 -0500 |
commit | 3e4d60bcd86b2a4373ff93bb5fd77570fa9ce91f (patch) | |
tree | 8c6aec84e289f6c4d2a472db95de07808667e88e /puppet/modules/site_apache/templates | |
parent | 90b672ed58982b232b1c96febcd9736ae5fc4faf (diff) | |
parent | 16c985a1b8e692c0e0f76a30b7ec052c9dc269bd (diff) |
Merge remote-tracking branch 'gerrit/develop' into develop
Diffstat (limited to 'puppet/modules/site_apache/templates')
-rw-r--r-- | puppet/modules/site_apache/templates/vhosts.d/hidden_service.conf.erb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/puppet/modules/site_apache/templates/vhosts.d/hidden_service.conf.erb b/puppet/modules/site_apache/templates/vhosts.d/hidden_service.conf.erb new file mode 100644 index 00000000..0c6f3b8e --- /dev/null +++ b/puppet/modules/site_apache/templates/vhosts.d/hidden_service.conf.erb @@ -0,0 +1,33 @@ +<VirtualHost 127.0.0.1:80> + ServerName <%= tor_domain %> + + <IfModule mod_headers.c> + Header always unset X-Powered-By + Header always unset X-Runtime + </IfModule> + +<% if (defined? @services) and (@services.include? 'webapp') -%> + DocumentRoot /srv/leap/webapp/public + + RewriteEngine On + # Check for maintenance file and redirect all requests + RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f + RewriteCond %{SCRIPT_FILENAME} !maintenance.html + RewriteCond %{REQUEST_URI} !/images/maintenance.jpg + RewriteRule ^.*$ %{DOCUMENT_ROOT}/system/maintenance.html [L] + + # http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerallowencodedslashes_lt_on_off_gt + AllowEncodedSlashes on + PassengerAllowEncodedSlashes on + PassengerFriendlyErrorPages off + SetEnv TMPDIR /var/tmp + + # Allow rails assets to be cached for a very long time (since the URLs change whenever the content changes) + <Location /assets/> + Header unset ETag + FileETag None + ExpiresActive On + ExpiresDefault "access plus 1 year" + </Location> +<% end -%> +</VirtualHost> |