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 13:32:37 GMT
Hi !

Thanks for answering...

> You are facing a very typical problem.

Undoubtly ;) !

> I am not proficient with mod_proxy_html, so I am not sure I can help you.
> However, the est way is always to go and fix the application.

It's such a pain ! There are plenty of well-designed apps, but far
more poorly written ones !

> If you can not do that for whatever reason, then mod_proxy_html is a good approach.
> A more general approach is to work with mod_ext_filter.
> See

I haven't heard about it. Thanks for the clue...

> It has some nice examples. Needless to say, that this
> is performance relevant

I have rather rough servers to handle reverse-proxyfication : two
dual-core Xeon @ 2 GHz with 2 GB RAM. They mostly sleep ;) !

>  and that this is evolving
> into not very elegant hack.

I ran into such awful hacks with mod_proxy_html. Not a good approach,
IMHO... It could be efficient, but it was impossible to quit the chain
of rewriting rules at the first match, resulting in ugly rewritings,
ans possibly infinite loops ! mod_proxy_html had though a "L" flag
(see, which
action is supposed to be 'If this rule matches, no more rules are
applied". But it didn't work with the packages available in my Etch

> I am not sure I understand what you are trying to
> achieve with E=HTTP_HOST... In order to get this to your
> application, you will have to set the http host header
> explicitely with mod_header.

You're right : with "RequestHeader set HOST", I can
alter the HTTP_HOST Apache environment variable. But I don't know how
to alter variables like SERVER_NAME.

Anyway, I get what I want, but it doesn't help : it gets my RP
confused. It now returns :
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /app/somepage.php.
Reason: Error reading from remote server

Let me explain what I was trying to do : alter the variables dumb apps
rely on, to set them a way that make these apps work behind a RP
without any patch or cryptic regexp.

Thanks & regards,


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