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]

 



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 http://httpd.apache.org/docs/2.0/mod/mod_ext_filter.html

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 http://apache.webthing.com/mod_proxy_html/config.html), 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
server...

> 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 app.private.zone", 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,

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