first pass at fixing proxy-ing behing https
[via-proxy] / p.vbz.ffzg.hr.conf
index c16cea3..3637ad3 100644 (file)
@@ -131,10 +131,10 @@ FilterChain NEWPATHS2
        Include /srv/via-proxy/ssl.conf
 
        ServerName onlinelibrary.wiley.com.p.vbz.ffzg.hr
        Include /srv/via-proxy/ssl.conf
 
        ServerName onlinelibrary.wiley.com.p.vbz.ffzg.hr
-#      SSLProxyEngine on
+       SSLProxyEngine on
 
 
-       ProxyPass        / http://onlinelibrary.wiley.com/
-       ProxyPassReverse / http://onlinelibrary.wiley.com/
+       ProxyPass        / https://onlinelibrary.wiley.com/
+       ProxyPassReverse / https://onlinelibrary.wiley.com/
 
        Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3"
        Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"
 
        Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3"
        Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"
@@ -161,6 +161,7 @@ FilterChain NEWPATHS2
 
        ServerName pubs.rsc.org.p.vbz.ffzg.hr
 
 
        ServerName pubs.rsc.org.p.vbz.ffzg.hr
 
+       # FIXME -- this doesn't work behind https!
        ProxyPass        / http://pubs.rsc.org/
        ProxyPassReverse / http://pubs.rsc.org/
 
        ProxyPass        / http://pubs.rsc.org/
        ProxyPassReverse / http://pubs.rsc.org/
 
@@ -184,7 +185,7 @@ FilterChain NEWPATHS2
 
        RequestHeader unset Accept-Encoding
 
 
        RequestHeader unset Accept-Encoding
 
-Substitute "s|http://apps.brepolis.net/|http://apps.brepolis.net.p.vbz.ffzg.hr/|n"
+Substitute "s|http://apps.brepolis.net/|https://apps.brepolis.net.p.vbz.ffzg.hr/|n"
 FilterDeclare NEWPATHS2
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
 FilterDeclare NEWPATHS2
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
@@ -207,7 +208,7 @@ FilterChain NEWPATHS2
 
        RequestHeader unset Accept-Encoding
 
 
        RequestHeader unset Accept-Encoding
 
-Substitute "s|http://apps.brepolis.net/|http://apps.brepolis.net.p.vbz.ffzg.hr/|n"
+Substitute "s|http://apps.brepolis.net/|https://apps.brepolis.net.p.vbz.ffzg.hr/|n"
 FilterDeclare NEWPATHS2
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
 FilterDeclare NEWPATHS2
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
@@ -274,13 +275,13 @@ FilterChain NEWPATHS2
        ProxyPass        / https://www.webofknowledge.com/
        ProxyPassReverse / https://www.webofknowledge.com/
 
        ProxyPass        / https://www.webofknowledge.com/
        ProxyPassReverse / https://www.webofknowledge.com/
 
-       Header edit* Location "(https://apps.webofknowledge.com)/(.*)" "http://apps.webofknowledge.com.p.vbz.ffzg.hr/$2"
+       Header edit* Location "(https://apps.webofknowledge.com)/(.*)" "https://apps.webofknowledge.com.p.vbz.ffzg.hr/$2"
 
        Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3"
        Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"
 
 RequestHeader unset Accept-Encoding
 
        Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3"
        Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"
 
 RequestHeader unset Accept-Encoding
-Substitute "s|https://apps.webofknowledge.com/|http://apps.webofknowledge.com.p.vbz.ffzg.hr/|n"
+Substitute "s|https://apps.webofknowledge.com/|https://apps.webofknowledge.com.p.vbz.ffzg.hr/|n"
 FilterDeclare NEWPATHS2
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
 FilterDeclare NEWPATHS2
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
 FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
@@ -359,16 +360,17 @@ FilterChain NEWPATHS2
        Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3"
        Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"
 
        Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3"
        Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"
 
-       Header edit* Location "https://([^/]*)/" "http://$1.p.vbz.ffzg.hr/"
+       Header edit* Location "https://([^/]*.nature.com)/" "https://$1.p.vbz.ffzg.hr/"
+
+RequestHeader unset Accept-Encoding
+Substitute "s|http://www.nature.com/|https://www.nature.com.p.vbz.ffzg.hr/|n"
+FilterDeclare NEWPATHS2
+FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
+FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
+FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/javascript|"
+FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^application/javascript|"
+FilterChain NEWPATHS2
 
 
-#RequestHeader unset Accept-Encoding
-#Substitute "s|https://idp.nature.com/|http://idp.nature.com.p.vbz.ffzg.hr/|n"
-#FilterDeclare NEWPATHS2
-#FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
-#FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
-#FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^text/javascript|"
-#FilterProvider NEWPATHS2 SUBSTITUTE "%{Content_Type} =~ m|^application/javascript|"
-#FilterChain NEWPATHS2
        CustomLog /var/log/apache2/access-p.vbz.ffzg.hr.log vhost_combined
 </VirtualHost>
 <VirtualHost *:443>
        CustomLog /var/log/apache2/access-p.vbz.ffzg.hr.log vhost_combined
 </VirtualHost>
 <VirtualHost *:443>
@@ -380,7 +382,7 @@ FilterChain NEWPATHS2
        ProxyPass        / https://idp.nature.com/
        ProxyPassReverse / https://idp.nature.com/
 
        ProxyPass        / https://idp.nature.com/
        ProxyPassReverse / https://idp.nature.com/
 
-       Header edit* Location "https://([^/]*)/" "http://$1.p.vbz.ffzg.hr/"
+       Header edit* Location "https://([^/]*.nature.com)/" "https://$1.p.vbz.ffzg.hr/"
        Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;][^;]+);" "$1 ; domain=$2.p.vbz.ffzg.hr;"
        Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"
 
        Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;][^;]+);" "$1 ; domain=$2.p.vbz.ffzg.hr;"
        Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"