less debugging
[mkws-moved-to-github.git] / tools / apache2 / mkws-live
index 379c07e..630170d 100644 (file)
     RewriteLog /var/log/apache2/mkws-rewrite.log 
 
     # Credential-hiding rewrite rules for standard MKWS account, testing account and various application accounts
-    RewriteRule /service-proxy-auth /service-proxy/?command=auth&action=login&username=mkws&password=mkws [P] # [NE,P]
-    RewriteRule /service-proxy-testauth  /service-proxy/?command=auth&action=login&username=mkwstest&password=mkwstest [P] # [NE,P]
-    RewriteRule /service-proxy-credoauth  /service-proxy/?command=auth&action=login&username=credo&password=emu [P] # [NE,P]
-    RewriteRule /service-proxy-kohaauth  /service-proxy/?command=auth&action=check,login&username=kohademo&password=kohademo [P]
+    RewriteRule /service-proxy-auth(/)?(;jsessionid=.+)?       /service-proxy/$2?command=auth&action=check,login&username=mkws&password=mkws [P]
+    RewriteRule /service-proxy-testauth(/)?(;jsessionid=.+)?   /service-proxy/$2?command=auth&action=check,login&username=mkwstest&password=mkwstest [P]
+    RewriteRule /service-proxy-credoauth(/)?(;jsessionid=.+)?          /service-proxy/$2?command=auth&action=check,login&username=credo&password=emu [P]
+    RewriteRule /service-proxy-kohaauth(/)?(;jsessionid=.+)?   /service-proxy/$2?command=auth&action=check,login&username=kohademo&password=kohademo [P]
+    RewriteRule /service-proxy-orexauth(/)?(;jsessionid=.+)?   /service-proxy/$2?command=auth&action=check,login&username=orex&password=orexmkc [P]
 
     # The following rule allows the server to accept service-proxy
     # requests that begin with an escaped "%3F" rather than a literal
     # For MKC Service Proxy
     ProxyPass        /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
     ProxyPassReverse /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
+    # Or use: sp-mkc-sansa.indexdata.com:8080 or sp-mkc-arya.indexdata.com:8080
+
+    PerlOptions +Parent
+    PerlSwitches -I/home/indexdata/mkws/tools/mod_perl
+    <Location /service-proxy>
+        PerlOutputFilterHandler MyApache2::SetACAO
+    </Location>
+</VirtualHost>
+
+# Separate hostname for the MKWS instance of the Service Proxy.
+# This allows us to use a different SP configuration that handles
+# authentication differently.
+#
+# Once this is in universal use, we can get rid of the Service Proxy
+# stuff in the configuration for mkws.indexdata.com
+#
+<VirtualHost *:80>
+    ServerName sp-mkws.indexdata.com
+
+    ErrorLog /var/log/apache2/sp-mkws-error.log
+    CustomLog /var/log/apache2/sp-mkws-access.log combined
+
+    DocumentRoot /home/indexdata/mkws/tools/sp-htdocs
+
+    # No rewriting on this server: use the true URL.
+    # (The security value of rewrite is when the application site does it.)
+
+    Header set Access-Control-Allow-Credentials true
+
+    ProxyPass        /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
+    ProxyPassReverse /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
+    # Or use: sp-mkc-sansa.indexdata.com:8080 or sp-mkc-arya.indexdata.com:8080
 
     PerlOptions +Parent
     PerlSwitches -I/home/indexdata/mkws/tools/mod_perl