httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Bond" <>
Subject [users@httpd] rewrite map and proxy loop
Date Mon, 02 Jun 2003 00:30:55 GMT
I have configured my apache proxy server to execute a external perl program 
when it receives a request from the clinet. I am using apache 2.0.45 on 
Following is the rewrite context and the program:

Rewrite rules:
RewriteEngine on
RewriteLog "/export/apps/apache/2.0.45/logs/rewrite/rewrite_test"
RewriteLogLevel 9
RewriteMap    lb      prg:/export/apps/apache/conf/
RewriteRule   ^/(.*)$ ${lb:$1}           [P,L]
Proxypassreverse  /  ${lb:$1} program:
print "";

Now this setup works when I access the reverse proxy server ip address for 
the first time. I get the following messages in the rewrite log file with 
correct values fro key and value.
When i access the reverse proxy server ip address for the second time then 
it goes in a loop an throw the following error on the browser:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

Reason: Max-Forwards has reached zero - proxy loop?


I get the following repeated messages in rewrite log file: - - [02/Jun/2003:01:27:21 +0100] 
[][rid#8136790/initial] (2) init rewrite engine with 
requested uri / - - [02/Jun/2003:01:27:21 +0100] 
[][rid#8136790/initial] (3) applying pattern 
'^/(.*)$' to uri '/' - - [02/Jun/2003:01:27:21 +0100] 
[][rid#8136790/initial] (5) map lookup OK: map=lb 
key= -> val= - - [02/Jun/2003:01:27:21 +0100] 
[][rid#8136790/initial] (2) rewrite / -> - - [02/Jun/2003:01:27:21 +0100] 
[][rid#8136790/initial] (2) forcing proxy-throughput 
with - - [02/Jun/2003:01:27:21 +0100] 
[][rid#8136790/initial] (1) go-ahead with proxy 
request proxy: [OK]

Any help or advice will be appreciated.


Express yourself with cool emoticons - download MSN Messenger today!

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