httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan AZZERA" <>
Subject Re: [users@httpd] Need help to deal with poorly written PHP apps behind Apache used as Reverse Proxy
Date Fri, 19 Oct 2007 19:09:54 GMT
> Proxying bad applications is a dirty business. They do not
> get any cleaner when they are told to behave nicely behind
> a proxy.

I'm afraid you're right...

> mod_rewrite has that too. When proxying with mod_rewrite it is
> a good practice to set that.
> RewriteRule /(.*)  http://backend/$1 [proxy,last]

But AFAIK, mod_rewrite cannot alter anything *inside* the HTML code
going out the server. mod_proxy_html can...

> SERVER_NAME is not an environment variable...
> I do not know your apps, so I can not really tell, but many times
> setting the appropriate http header "Host" is enough.

I'm currently trying to deal with PMWiki. It uses only HTTP_HOST. The
problem with this application is that developpers use HTTP_HOST to
construct absolute URL everywhere in the HTML code their PHP generate,
even in CSS and Scripts. Pfouark !

Anyway, colleagues reported to me use of SERVER_NAME in other apps...
I've just forgotten their names.

> You must have messed your requests completely on the proxy. OR
> something similar. I suggest you run tcpdump (tcpdump -A -s 0 port 8080)
> or something similar between the two and dump the traffic for
> debugging.

Thanks for your tips, I will investigate. Seems to be no clean and
simple solution.



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