Merge branch 'master' into templateallthemarkup
[mkws-moved-to-github.git] / tools / apache2 / mkws-live
1 # Configuration for the apache web server
2 # Running on caliban
3
4 <VirtualHost *:80>
5     ServerName mkws.indexdata.com
6
7     ErrorLog /var/log/apache2/mkws-error.log
8     CustomLog /var/log/apache2/mkws-access.log combined
9
10     DocumentRoot /home/indexdata/mkws/tools/htdocs
11     Alias /libjs-pz2/ /home/indexdata/libjs-pz2/
12     Alias /pazpar2/ /home/indexdata/pazpar2/
13
14     RewriteEngine on
15     RewriteLogLevel 1
16     RewriteLog /var/log/apache2/mkws-rewrite.log 
17
18     # Credential-hiding rewrite rules for standard MKWS account, testing account and various application accounts
19     RewriteRule /service-proxy-auth(/)?(;jsessionid=.+)?        /service-proxy/$2?command=auth&action=check,login&username=mkws&password=mkws&identity=mkws [P]
20     RewriteRule /service-proxy-testauth(/)?(;jsessionid=.+)?    /service-proxy/$2?command=auth&action=check,login&username=mkwstest&password=mkwstest&identity=mkws_test [P]
21     RewriteRule /service-proxy-credoauth(/)?(;jsessionid=.+)?   /service-proxy/$2?command=auth&action=check,login&username=credo&password=emu&identity=testing_credo_emulator [P]
22     RewriteRule /service-proxy-kohaauth(/)?(;jsessionid=.+)?    /service-proxy/$2?command=auth&action=check,login&username=kohademo&password=kohademo&identity=demo_koha_mkws [P]
23     RewriteRule /service-proxy-orexauth(/)?(;jsessionid=.+)?    /service-proxy/$2?command=auth&action=check,login&username=orex&password=orexmkc&identity=orex_digital2 [P]
24
25     # The following rule allows the server to accept service-proxy
26     # requests that begin with an escaped "%3F" rather than a literal
27     # "?". This is useful, as requests generated by ProxyPass
28     # elsewhere always have the leading "?" escaped for some reason.
29     RewriteRule /service-proxy/\?(.*) /service-proxy/?$1 [P] # [NE,P]
30
31     Header set Access-Control-Allow-Credentials true
32
33     # For MKC Service Proxy
34 #    ProxyPreserveHost On
35     #ProxyPass        /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
36     #ProxyPassReverse /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
37     ProxyPass        /service-proxy/ http://sp-mkc-sansa.indexdata.com:8080/service-proxy/
38     ProxyPassReverse /service-proxy/ http://sp-mkc-sansa.indexdata.com:8080/service-proxy/
39     # Or use: sp-mkc-sansa.indexdata.com:8080 or sp-mkc-arya.indexdata.com:8080
40
41     PerlOptions +Parent
42     PerlSwitches -I/home/indexdata/mkws/tools/mod_perl
43     <Location /service-proxy>
44         PerlOutputFilterHandler MyApache2::SetACAO
45     </Location>
46 </VirtualHost>