httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vieri Di Paola <vieridipa...@gmail.com>
Subject [users@httpd] reverse proxy and path
Date Tue, 14 Jan 2020 10:42:12 GMT
Hi,

I can successfully access a backend server through directives like these:

        ProxyPass / http://192.168.250.1:8080/
        ProxyPassReverse / http://192.168.250.1:8080/

However, I'm having trouble if I use this other configuration:

        ProxyPass /rp/1/ http://192.168.250.1:8080/
        ProxyPassReverse /rp/1/ http://192.168.250.1:8080/

The first page loads fine, but it contains HTML code like this one below:

<base href="/2/" />
<link href="css/bootstrap.12pt.css" rel="stylesheet"/>

So the client browser tries to connect to
https://my_apache_reverse_proxy/2/css/bootstrap.12pt.css instead of
https://my_apache_reverse_proxy/rp/1/2/css/bootstrap.12pt.css which
fails with a HTTP/1.1 404 Not Found. Manually connecting to
https://my_apache_reverse_proxy/rp/1/2/css/bootstrap.12pt.css works
fine.

How can I fix this?

I've tried a rewrite, but it doesn't seem to apply.

        RewriteEngine On
        RewriteRule ^/2/(.*)$ /pr/1/2/$1

Any ideas?

Vieri

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message