source: trunk/server/fedora/config/etc/httpd/conf.d/scripts-special.conf @ 2675

Last change on this file since 2675 was 2675, checked in by andersk, 7 years ago
Don’t override ErrorDocument 403 in .htaccess
File size: 1.6 KB
Line 
1Alias /__scripts/heartbeat /afs/athena.mit.edu/contrib/scripts/web_scripts/heartbeat
2Alias /__scripts/django/static/admin /usr/lib/python2.7/site-packages/django/contrib/admin/static/admin
3Alias /__scripts /afs/athena.mit.edu/contrib/scripts/www
4
5<Directory /afs/athena.mit.edu/contrib/scripts/www>
6    <Files *>
7        SetHandler none
8    </Files>
9    SSILegacyExprParser off
10</Directory>
11
12<Directory /usr/lib/python2.7/site-packages/django/contrib/admin/static/admin>
13    <Files *>
14        SetHandler none
15    </Files>
16</Directory>
17
18<Location /__scripts/needcerts>
19    RewriteEngine On
20
21    RewriteCond %{HTTP_HOST} !:444$
22    RewriteCond %{SERVER_NAME} ^(.*\.)?scripts$
23    RewriteCond %{THE_REQUEST} ^[^\ ]*\ (.*)\ .*
24    RewriteRule ^ https://%{SERVER_NAME}.mit.edu:444%1 [L,R]
25
26    RewriteCond %{HTTP_HOST} !:444$
27    RewriteCond %{SERVER_NAME} !=scripts-cert.mit.edu
28    RewriteCond %{SERVER_NAME} !=scripts-cert
29    RewriteCond %{THE_REQUEST} ^[^\ ]*\ (.*)\ .*
30    RewriteRule ^ https://%{SERVER_NAME}:444%1 [L,R]
31
32    RewriteCond %{HTTP_USER_AGENT} Mac\ OS\ X.*AppleWebKit
33    RewriteRule /afs/athena.mit.edu/contrib/scripts/www/needcerts(.*) /__scripts/certerror$1 [L]
34
35    RewriteRule /afs/athena.mit.edu/contrib/scripts/www/needcerts(.+) $1 [L]
36    RewriteRule /afs/athena.mit.edu/contrib/scripts/www/needcerts /__scripts/unauthorized.html [L]
37</Location>
38
39<IfModule ssl_module>
40<Location /__scripts/certerror>
41    SSLVerifyClient require
42    RewriteRule /afs/athena.mit.edu/contrib/scripts/www/certerror(.+) $1 [L]
43    RewriteRule /afs/athena.mit.edu/contrib/scripts/www/certerror /__scripts/unauthorized.html [L]
44</Location>
45</IfModule>
46
47ErrorDocument 403 /__scripts/forbidden.shtml
Note: See TracBrowser for help on using the repository browser.