httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krist van Besien" <>
Subject Re: [users@httpd] ProxyPass/ProxyPassReverse: url is not translated
Date Fri, 11 Jan 2008 11:55:43 GMT
On Jan 11, 2008 4:55 AM, Mike Wang <> wrote:
> Hi
>    I have tried to use proxypass with virtual host, here is what I want to do:
>   on server A,  virutal host :
>   on Server B:  a application is running at at:
>    I want server A to do the reverse proxy to server B,
>    that mean  ==>
>    And my configure on Server A is:
> <VirtualHost *:80>
>   ServerName
>   ProxyPass /
>   ProxyPassReverse /
>   ProxyPreserveHost On
> </VirtualHost>
>   The issue is:
>      when I tried to access, the first
> home page showed up,
>      but on this page, there are links like:
>    etc
>     these links has not being translated to:
>     I tried other configures:
>         ProxyHTMLURLMap /
>       No luck.
>      anything could be wrong?

ProxyPassReverse only tells your webserver to replace with in
redirects your backend might generate. This does not change the
content of the response.

Your problem is that your backend produces content with absolute links
in it, referring to itself. This conent is passed on to your
webbrowser without change. You can solve this problem in several ways.
- Configure your backend to use as base
url when it generates URLs.
- Or better: configure your backkend to use relative URLs only.

But for this you'll have to consult the documentation of your backend.
In short: when a webapp lives behind a proxy it often needs to be
configured as if it was actually _on_ that proxy.

As a last resort you can use output filtering using proxy_html see: (read this, especially
the part Fixing HTML)

you will need at least the following directives:
LoadModule proxy_http_module modules/
SetOutputFilter proxy-html

If this doesn't work increase the verbosity of your logs,
ProxyHTMLLogVerbose On
LogLevel  Debug


Bremgarten b. Bern, Switzerland
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message