From 8b3f420d71600f157cff061785696dfe5c57cf72 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 23 Mar 2018 13:13:02 +0100 Subject: [PATCH] first pass at fixing proxy-ing behing https --- index.html | 11 +++++++---- p.vbz.ffzg.hr.conf | 36 +++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/index.html b/index.html index d06a9cc..2c45b66 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@
  • Ovid mesz
  • Wiley
  • Sage -
  • The Royal Society of Chemistry's +
  • The Royal Society of Chemistry's FIXME
  • Brepolis
  • Cairn
  • De Gruyter Publishers @@ -19,13 +19,15 @@
  • nature
  • palgrave
  • springerlink -
  • tandfonline +
  • Taylor & Francis Online
  • sciencedirect
  • scopus -
  • bmj -
  • ieeexplore +
  • bmj FIXME +
  • ieeexplore FIXME + + diff --git a/p.vbz.ffzg.hr.conf b/p.vbz.ffzg.hr.conf index c16cea3..3637ad3 100644 --- a/p.vbz.ffzg.hr.conf +++ b/p.vbz.ffzg.hr.conf @@ -131,10 +131,10 @@ FilterChain NEWPATHS2 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" @@ -161,6 +161,7 @@ FilterChain NEWPATHS2 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/ @@ -184,7 +185,7 @@ FilterChain NEWPATHS2 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|" @@ -207,7 +208,7 @@ FilterChain NEWPATHS2 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|" @@ -274,13 +275,13 @@ FilterChain NEWPATHS2 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 -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|" @@ -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* 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 @@ -380,7 +382,7 @@ FilterChain NEWPATHS2 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" -- 2.20.1