Re: Need help to deal with poorly written PHP apps behind Apache used as Reverse Proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.

Regard,

Al.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux