blob: 1d19094e21b8ca84997efd4f44193078e30e9f2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<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
<% if scope.function_guess_apache_version([]) == '2.4' %>
<Directory /srv/leap/webapp/public>
AllowOverride None
Require all granted
</Directory>
<% end %>
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>
|