httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Seeberg <s...@geeq.de>
Subject [users@httpd] mod_substitute / mod_sed with Apache 2.4.7 (Ubuntu 14.04)
Date Wed, 09 Mar 2016 17:10:27 GMT
Hi everybody,

I'm having a problem with mod_substitute or mod_sed while using one
apache2 (Ubuntu 14.04) as a proxy and load balancer.

The connection between proxy and backend is not encrypted, therefore the
backend delivers only non-https links with the backend FQDN. Those have
to be replaced by the corresponding proxy FQDN.

On the documentation page
(https://httpd.apache.org/docs/2.4/mod/mod_substitute.htm) is an example
for this specific use case. However it does not work for me and I cannot
find the reason. mod_deflate is not enabled.

For testing purposes I created an index.html with the content "asdf" in
the DocumentRoot. The content is also not replaced. Can anyone give me a
hint on how to further debug this problem? Could this problem be
specific for the Ubuntu package / dependent on a compiling parameter?

### site config ###

<Virtualhost *:443>
        ServerName www.somedomain.tld
        DocumentRoot /var/www/redirect

        SSLEngine On
        SSLCertificateFile /etc/letsencrypt/live/somedomain.tld/cert.pem
        SSLCertificateChainFile
/etc/letsencrypt/live/somedomain.tld/chain.pem
        SSLCertificateKeyFile
/etc/letsencrypt/live/somedomain.tld/privkey.pem

        ProxyPass /wordpress_test/
http://backend.somedomain.tld/wordpress_test/
        ProxyPassReverse /wordpress_test/
http://backend.somedomain.tld/wordpress_test/

        <Location />
                Substitute
"s|http://backend.somedomain.tld/|https://www.somedomain.tld/|i"
                Substitute "s|asdf|jkl|i"
                Substitute
"s|http://backend.somedomain.tld/|https://www.somedomain.tld/|"
        </Location>

</VirtualHost>

### end site config ###

Cheers
Sven



Mime
View raw message