mod_proxy / proxy_add_forward_module and mod_rewrite: strange behavior !

mod_proxy / proxy_add_forward_module and mod_rewrite: strange behavior !

Post by Fabien Pens » Thu, 10 May 2001 18:54:13



Hello everyone,

I am using mod_proxy and proxy_add_forward_module to add the original IP
of the client. The configuration is a little bit complexe. I have 2
differents apache running, the 80 one which is as small as possible, the
second one which has the PHP module.

The front one deserve all the files it can handles (everything except
.php3) as the second one handles the PHP. My config file for the front
apache looks like:

<Files ~ "\.php3?$">
    Rewri*gine on
    RewriteBase /
    RewriteCond   %{THE_REQUEST} "^[^ ]+ ([^ ]+)"
    RewriteRule ^(.*)$ http://localhost:8080%1 [proxy]
</Files>

So all the .php3 files are redirected through the proxy. But the
X_FORWARDED_FOR var isn't completed.

If I use the following line:

ProxyPass / http://localhost:8080/

then it works perfect. So I guess this is a problem in mod_rewrite and
the [proxy] type. Does anyone know how to fix that ?

Thanks.

 
 
 

1. Apache and mod_proxy strange behaviour

I'm using Apache to proxy a web on Window NT machine.  I have two proxy
directives:

ProxyPass           /library/ http://10.1.0.31:80/scripts/
ProxyPassReverse    /library/ http://10.1.0.31:80/scripts/

Most things work fine and I can see the web page at
http://www.kgv.net/library/afwiinq.dll? except a logo that should be being
passed at http://www.kgv.net/library/afwiinq.dll?Image?Name=Web comes out
as an http header and the image as garbled text.

If I go directly to the NT machine ie:
http://10.1.0.31/scripts/afwiinq.dll? the image comes out fine.  It also
comes out okay on a couple of isolated browsers.

I've put real addresses, so anyone interested can have a look for real.

Anyone got any ideas?

Regards
John Ryan
Systems Manager
KGV School

--
Posted from student.kgv.edu.hk [152.101.128.2]
via Mailgate.ORG Server - http://www.Mailgate.ORG

2. Apache load-balancing - possible??

3. Can't make mod_proxy and mod_rewrite work together

4. Only hour uptime. kernel 2.0.0 with ISDN. Why?

5. mod_rewrite/mod_proxy and QUERY_STRING problems - SOLVED

6. Need advice on securing IRC

7. the process sequence of mod_proxy and mod_rewrite

8. USB Mouse

9. mod_rewrite + mod_proxy does not preserve Host: header (?)

10. Compiling mod_proxy & mod_rewrite

11. apache mod_rewrite + mod_proxy

12. apache mod_rewrite/mod_proxy problem

13. mod_rewrite/mod_proxy and QUERY_STRING problems