Hi,

The entry in my httpd.conf file is

ProxyPassReverse /metso http://mgtpdma3.rau.valmet.com:7003/metso
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
RewriteCond %{REQUEST_URI} 
(.*\.jsp$)|(.*/servlet/.*)|(.*/workspace/.*)|(.*\.do$)
##WANWhitepaper.doc Page 4
###Proprietary and Confidential WAN Performance Architecture
RewriteRule ^/metso/(.*) http://mgtpdma3.rau.valmet.com:7003/metso/$1 [P]

The ewrite log shows
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (2) init rewrite 
engine with requested uri /metso/login.jsp
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (3) applying 
pattern '^/metso/(.*)' to uri '/metso/login.jsp'
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (4) RewriteCond: 
input='/metso/login.jsp' 
pattern='(.*\.jsp$)|(.*/servlet/.*)|(.*/workspace/.*)|(.*\.do$)' => matched
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (2) rewrite 
/metso/login.jsp -> http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (2) forcing 
proxy-throughput with http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (9) Request 
filename after rewrite rules: 
proxy:http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (9) Request path 
info after rewrite rules:
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (9) Request args 
after rewrite rules:
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (1) go-ahead with 
proxy request proxy:http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp [OK]

The access log of the apache shows
192.168.251.211 - - [07/Jul/2006:17:52:58 +0300] "GET /metso/login.jsp 
HTTP/1.1" 404 209

However If I don't use [P] tag then the external direction happens. And the 
entries in rewrite.log are:
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (2) init rewrite 
engine with requested uri /metso/login.jsp
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (3) applying 
pattern '^/metso/(.*)' to uri '/metso/login.jsp'
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (4) RewriteCond: 
input='/metso/login.jsp' 
pattern='(.*\.jsp$)|(.*/servlet/.*)|(.*/workspace/.*)|(.*\.do$)' => matched
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (2) rewrite 
/metso/login.jsp -> http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (2) implicitly 
forcing redirect (rc=302) with 
http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (9) Request 
filename after rewrite rules: 
http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (9) Request path 
info after rewrite rules:
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (9) Request args 
after rewrite rules:
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (1) escaping 
http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp for redirect
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] 
[mgtpdma3.rau.valmet.com/sid#400b6420][rid#40284070/initial] (1) redirect to 
http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp [REDIRECT/302]

And the entries in the access log are
192.168.251.211 - - [07/Jul/2006:18:01:04 +0300] "GET /metso/login.jsp 
HTTP/1.1" 302 371

I am not able to understand that if I am able to use external redirection then 
what is the issues with internal proxy redirection. I am stuck up since last 1 
week.
Please help me.


-----Original Message-----
From: Axel-Stéphane SMORGRAV [mailto:[EMAIL PROTECTED]
Sent: Friday, July 07, 2006 7:30 PM
To: users@httpd.apache.org
Subject: RE: [EMAIL PROTECTED] Re: problem with mod_rewrite rewiterule with 
[P](internal proxying)

No you do not need to statically link mod_proxy. Loading it as a DSO is just 
fine.

As shown by the RewriteLog, the request is indeed proxied to 
mgtpdma3.rau.valmet.com:7003. If you doubt that, you can check the application 
server logs on mgtpdma3. I would still like to see a trace of the requests and 
associated responses from the moment you issue the request for 
/metso/login.jsp, until you receive the 404.

If you had a proxy problem I believe you would have gotten a 500, or a 502. The 
404 could either come from the application server, or from Apache. In that case 
we would need to know which of those issue the error, and the exact URL 
requested. If you want help with this problem, please provide a trace or at 
least a relevant snippet of your access logs.

-ascs

-----Original Message-----
From: Ravish Agarwal [mailto:[EMAIL PROTECTED]
Sent: Friday, July 07, 2006 10:39 AM
To: users@httpd.apache.org
Cc: [EMAIL PROTECTED]
Subject: Re: [EMAIL PROTECTED] Re: problem with mod_rewrite rewiterule with 
[P](internal proxying)

But my problem is that if I remove [P] tag then every thing works fine. so do I 
need to have compile version of mod_proxy.c as the manual page for apache 1.3 
says but its not there at apache 2.0 manual page. I am using apache 2.0.55

Output of httpd -l shows the following
 $ ./httpd -l
Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_so.c


I have the mod_proxy_http enabled too. So what could be the poblem?
On 7/7/06, Axel-Stéphane  SMORGRAV
<[EMAIL PROTECTED]> wrote:
>  The rewrite logs included in the original post indicate that the proxying 
> does work, so that cannot possibly be the problem.
>
> -ascs
>
>

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to