added missing asistdl.onlinelibrary.wiley.com
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 2 Apr 2020 14:06:33 +0000 (16:06 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 2 Apr 2020 14:06:48 +0000 (16:06 +0200)
extract configuration into separate config file

p.vbz.ffzg.hr.conf
providers/onlinelibrary.wiley.com.conf [new file with mode: 0644]

index 1c673a1..fa30764 100644 (file)
@@ -177,59 +177,6 @@ SSLCertificateFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/fullchain.pem
 SSLCertificateKeyFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/privkey.pem
 </VirtualHost>
 
 SSLCertificateKeyFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/privkey.pem
 </VirtualHost>
 
-<VirtualHost *:443>
-       Include /srv/via-proxy/ssl.conf
-
-       ServerName onlinelibrary.wiley.com.p.vbz.ffzg.hr
-       SSLProxyEngine on
-       ProxyAddHeaders Off
-
-       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* Location "https://anthrosource.onlinelibrary.wiley.com" "https://anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr"
-       CustomLog /var/log/apache2/access-p.vbz.ffzg.hr.log vhost_combined
-SSLCertificateFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/fullchain.pem
-SSLCertificateKeyFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/privkey.pem
-</VirtualHost>
-<VirtualHost *:443>
-       Include /srv/via-proxy/ssl.conf
-
-       ServerName anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr
-       SSLProxyEngine on
-       ProxyAddHeaders Off
-
-       ProxyPass        / https://anthrosource.onlinelibrary.wiley.com/
-       ProxyPassReverse / https://anthrosource.onlinelibrary.wiley.com/
-
-       Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3"
-       Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"
-
-       CustomLog /var/log/apache2/access-p.vbz.ffzg.hr.log vhost_combined
-SSLCertificateFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/fullchain.pem
-SSLCertificateKeyFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/privkey.pem
-</VirtualHost>
-
-<VirtualHost *:443>
-       Include /srv/via-proxy/ssl.conf
-
-       ServerName journals.sagepub.com.p.vbz.ffzg.hr
-       SSLProxyEngine on
-       ProxyAddHeaders Off
-
-       ProxyPass        / https://journals.sagepub.com/
-       ProxyPassReverse / https://journals.sagepub.com/
-
-       Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3"
-       Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1"
-
-       CustomLog /var/log/apache2/access-p.vbz.ffzg.hr.log vhost_combined
-SSLCertificateFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/fullchain.pem
-SSLCertificateKeyFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/privkey.pem
-</VirtualHost>
 
 <VirtualHost *:443>
        Include /srv/via-proxy/ssl.conf
 
 <VirtualHost *:443>
        Include /srv/via-proxy/ssl.conf
diff --git a/providers/onlinelibrary.wiley.com.conf b/providers/onlinelibrary.wiley.com.conf
new file mode 100644 (file)
index 0000000..71b856f
--- /dev/null
@@ -0,0 +1,118 @@
+# ./add-provider.pl onlinelibrary.wiley.com anthrosource.onlinelibrary.wiley.com asistdl.onlinelibrary.wiley.com
+
+
+
+<VirtualHost *:443>
+       Include /srv/via-proxy/ssl.conf
+
+       ServerName onlinelibrary.wiley.com.p.vbz.ffzg.hr
+
+       RewriteEngine on
+       SSLProxyEngine on
+
+       ProxyAddHeaders Off
+       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* Location "https://onlinelibrary.wiley.com/" "https://onlinelibrary.wiley.com.p.vbz.ffzg.hr/"
+       Header edit* Location "https://anthrosource.onlinelibrary.wiley.com/" "https://anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr/"
+       Header edit* Location "https://asistdl.onlinelibrary.wiley.com/" "https://asistdl.onlinelibrary.wiley.com.p.vbz.ffzg.hr/"
+
+       RequestHeader unset Accept-Encoding
+       Substitute "s|https://onlinelibrary.wiley.com|https://onlinelibrary.wiley.com.p.vbz.ffzg.hr|"
+       Substitute "s|https://anthrosource.onlinelibrary.wiley.com|https://anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr|"
+       Substitute "s|https://asistdl.onlinelibrary.wiley.com|https://asistdl.onlinelibrary.wiley.com.p.vbz.ffzg.hr|"
+
+       FilterDeclare NEWPATHS
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/javascript|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^application/javascript|"
+       FilterChain NEWPATHS
+
+       CustomLog /var/log/apache2/access-p.vbz.ffzg.hr.log vhost_combined
+SSLCertificateFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/fullchain.pem
+SSLCertificateKeyFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/privkey.pem
+</VirtualHost>
+
+
+<VirtualHost *:443>
+       Include /srv/via-proxy/ssl.conf
+
+       ServerName anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr
+
+       RewriteEngine on
+
+       SSLProxyEngine on
+       ProxyAddHeaders Off
+       ProxyPass        / https://anthrosource.onlinelibrary.wiley.com/
+       ProxyPassReverse / https://anthrosource.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* Location "https://onlinelibrary.wiley.com/" "https://onlinelibrary.wiley.com.p.vbz.ffzg.hr/"
+       Header edit* Location "https://anthrosource.onlinelibrary.wiley.com/" "https://anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr/"
+       Header edit* Location "https://asistdl.onlinelibrary.wiley.com/" "https://asistdl.onlinelibrary.wiley.com.p.vbz.ffzg.hr/"
+
+       RequestHeader unset Accept-Encoding
+       Substitute "s|https://onlinelibrary.wiley.com|https://onlinelibrary.wiley.com.p.vbz.ffzg.hr|"
+       Substitute "s|https://anthrosource.onlinelibrary.wiley.com|https://anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr|"
+       Substitute "s|https://asistdl.onlinelibrary.wiley.com|https://asistdl.onlinelibrary.wiley.com.p.vbz.ffzg.hr|"
+
+       FilterDeclare NEWPATHS
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/javascript|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^application/javascript|"
+       FilterChain NEWPATHS
+
+       CustomLog /var/log/apache2/access-p.vbz.ffzg.hr.log vhost_combined
+SSLCertificateFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/fullchain.pem
+SSLCertificateKeyFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/privkey.pem
+</VirtualHost>
+
+
+<VirtualHost *:443>
+       Include /srv/via-proxy/ssl.conf
+
+       ServerName asistdl.onlinelibrary.wiley.com.p.vbz.ffzg.hr
+
+       RewriteEngine on
+       # fix broken chunging
+       #RewriteRule    /common/javascript/extjs/ext-all.js     https://asistdl.onlinelibrary.wiley.com/common/javascript/extjs/ext-all.js [R,L]
+
+       SSLProxyEngine on
+       ProxyAddHeaders Off
+       ProxyPass        / https://asistdl.onlinelibrary.wiley.com/
+       ProxyPassReverse / https://asistdl.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* Location "https://onlinelibrary.wiley.com/" "https://onlinelibrary.wiley.com.p.vbz.ffzg.hr/"
+       Header edit* Location "https://anthrosource.onlinelibrary.wiley.com/" "https://anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr/"
+       Header edit* Location "https://asistdl.onlinelibrary.wiley.com/" "https://asistdl.onlinelibrary.wiley.com.p.vbz.ffzg.hr/"
+
+       RequestHeader unset Accept-Encoding
+       Substitute "s|https://onlinelibrary.wiley.com|https://onlinelibrary.wiley.com.p.vbz.ffzg.hr|"
+       Substitute "s|https://anthrosource.onlinelibrary.wiley.com|https://anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr|"
+       Substitute "s|https://asistdl.onlinelibrary.wiley.com|https://asistdl.onlinelibrary.wiley.com.p.vbz.ffzg.hr|"
+
+       FilterDeclare NEWPATHS
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/javascript|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^application/javascript|"
+       FilterChain NEWPATHS
+
+       CustomLog /var/log/apache2/access-p.vbz.ffzg.hr.log vhost_combined
+SSLCertificateFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/fullchain.pem
+SSLCertificateKeyFile /etc/letsencrypt/live/p.vbz.ffzg.hr-0001/privkey.pem
+</VirtualHost>
+
+
+## add domains to SSL certificate:
+# onlinelibrary.wiley.com.p.vbz.ffzg.hr
+# anthrosource.onlinelibrary.wiley.com.p.vbz.ffzg.hr
+# asistdl.onlinelibrary.wiley.com.p.vbz.ffzg.hr