blob: 232b1577fca0597bf43b6cc97e5fc21336b31806 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
<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 -%>
<% if (defined? @services) and (@services.include? 'static') -%>
DocumentRoot "/srv/static/root/public"
<% if scope.function_guess_apache_version([]) == '2.4' %>
<Directory /srv/static/root/public>
AllowOverride None
Require all granted
</Directory>
<% end %>
AccessFileName .htaccess
Alias /provider.json /srv/leap/provider.json
<Location /provider.json>
Header set X-Minimum-Client-Version 0.5
</Location>
<% end -%>
</VirtualHost>
|