httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Folini <>
Subject Re: [users@httpd] Need help to deal with poorly written PHP apps behind Apache used as Reverse Proxy
Date Fri, 19 Oct 2007 12:02:11 GMT
Hey Alan,

You are facing a very typical problem. I am not proficient
with mod_proxy_html, so I am not sure I can help you.

However, the best way is always to go and fix the
application. 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.
It has some nice examples. Needless to say, that this
is performance relevant and that this is evolving
into not very elegant hack.
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.



On Fri, Oct 19, 2007 at 01:54:07PM +0200, Alan AZZERA wrote:
> Hi world !
> Here is my problem, I hope someone could help me.
> I need to host some web apps, coded in PHP by non-professional developpers,
> and sometimes poorly written and designed. I use an Apache server configured
> as a Reverse Proxy, my real HTTP server is behind this R.P. I have two DNS
> zones, a public one and a private one. Here is the chain :
>    1. Client's web browser asks for
>    2. My Apache RP has a Virtual Host (ServerName that
>    catches the request, and (reverse)proxifies it to
>    3. My Apache private server has a VirtualHost (Servername
> that handles the request.
> Everything works fine with well coded and designed PHP apps, that make use
> of right Apache environment variables like HTTP_X_FORWARDED_(HOST|SERVER).
> But apps that make use of SCRIPT_URI, SERVER_NAME or HTTP_HOST cause
> troubles. I tried to handle these troubles with mod_proxy_html, but I failed
> to configure it to rewrite efficiently URL in CSS or JavaScripts. Desperate,
> I tried to handle this with mod_rewrite and its [E=HTTP_HOST:
>] feature in the VirtualHost It failed too.
> Do I miss something obvious ? Am I trying to solve problems the wrong way ?
> Since I am not far for being just a newbie, it is very possible... Would
> anyone be keen enough to put me on the right way ?
> Best regards,
> Al.

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