# ./add-provider.pl www.artstor.org library.artstor.org Include /srv/via-proxy/ssl.conf ServerName www.artstor.org.p.vbz.ffzg.hr RewriteEngine on # fix broken chunging #RewriteRule /common/javascript/extjs/ext-all.js https://www.artstor.org/common/javascript/extjs/ext-all.js [R,L] SSLProxyEngine on ProxyAddHeaders Off ProxyPass / https://www.artstor.org/ ProxyPassReverse / https://www.artstor.org/ Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3" #Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1" # if there are problems, remove traling / Header edit* Location "https://www.artstor.org/" "https://www.artstor.org.p.vbz.ffzg.hr/" Header edit* Location "https://library.artstor.org/" "https://library.artstor.org.p.vbz.ffzg.hr/" RequestHeader unset Accept-Encoding Substitute "s|https://www.artstor.org|https://www.artstor.org.p.vbz.ffzg.hr|" Substitute "s|https://library.artstor.org|https://library.artstor.org.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 Include /srv/via-proxy/ssl.conf ServerName library.artstor.org.p.vbz.ffzg.hr RewriteEngine on # fix broken chunging #RewriteRule /common/javascript/extjs/ext-all.js https://library.artstor.org/common/javascript/extjs/ext-all.js [R,L] SSLProxyEngine on ProxyAddHeaders Off ProxyPass / https://library.artstor.org/ ProxyPassReverse / https://library.artstor.org/ Header edit* Set-Cookie "(.*)(?i:; *domain=)([^;]+)(.*)" "$1 ; domain=$2.p.vbz.ffzg.hr $3" #Header edit* Set-Cookie "(.*)(?i:; *secure)" "$1" # if there are problems, remove traling / Header edit* Location "https://www.artstor.org/" "https://www.artstor.org.p.vbz.ffzg.hr/" Header edit* Location "https://library.artstor.org/" "https://library.artstor.org.p.vbz.ffzg.hr/" RequestHeader unset Accept-Encoding Substitute "s|https://www.artstor.org|https://www.artstor.org.p.vbz.ffzg.hr|" Substitute "s|https://library.artstor.org|https://library.artstor.org.p.vbz.ffzg.hr|" Substitute "s|/(\w+\.[0-9a-f]+.js)|https://library.artstor.org/$1|i" 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 ## add domains to SSL certificate: # www.artstor.org.p.vbz.ffzg.hr # library.artstor.org.p.vbz.ffzg.hr