Hi world !

First, please forgive my poor written English. 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
zone, a public one and a private one. Here is the chain :

   1. Client's web browser asks for http://app.public.zone/
   2. My Apache RP has a Virtual Host (ServerName app.public.zone) that
   catches the request, and (reverse)proxifies it to
   http://app.private.zone/
   3. My Apache private server has a VirtualHost (Servername
   app.private.zone) 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:app.public.zone]
feature in the VirtualHost app.private.zone. It failed too.

Do I miss something obvious ? Am I trying to solve problems the wrong way ?
Since I am not far for being a newbie, it is very possible... Would anyone
be keen enough to put me on the right way ?

Best regards,

Al.

Reply via email to