keep reverse proxy in sync with sp-mkws-live, MKWS-268
[mkws-moved-to-github.git] / tools / apache2 / mkws-git
1 # Configuration for the apache web server
2 # Running on caliban FROM AN UP-TO-DATE UNSTABLE GIT CHECKOUT
3
4 <VirtualHost *:80>
5     ServerName mkws-git.indexdata.com
6
7     ErrorLog /var/log/apache2/mkws-git-error.log
8     CustomLog /var/log/apache2/mkws-git-access.log combined
9
10     DocumentRoot /home/indexdata/mkws-git/tools/htdocs
11     Alias /libjs-pz2/ /home/indexdata/libjs-pz2/
12
13     RewriteEngine on
14     RewriteLogLevel 1
15     RewriteLog /var/log/apache2/mkws-git-rewrite.log 
16     RewriteRule /service-proxy-auth(/)?(;jsessionid=.+)? /service-proxy/$2?command=auth&action=login&username=guest&password=guest [P] # [NE,P]
17
18     # The following rule allows the server to accept service-proxy
19     # requests that begin with an escaped "%3F" rather than a literal
20     # "?". This is useful, as requests generated by ProxyPass
21     # elsewhere always have the leading "?" escaped for some reason.
22     RewriteRule /service-proxy/\?(.*) /service-proxy/?$1 [P] # [NE,P]
23
24     Header set Access-Control-Allow-Credentials true
25
26     # For MKC Service Proxy
27     ProxyPass        /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
28     ProxyPassReverse /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
29
30     PerlOptions +Parent
31     PerlSwitches -I/home/indexdata/mkws-git/tools/mod_perl
32     <Location /service-proxy>
33         PerlOutputFilterHandler MyApache2::SetACAO
34     </Location>
35 </VirtualHost>