FW: [users@httpd] Re: problem with mod_rewrite rewiterule with [P](internal proxying)

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

 



Very strange... Apparently the list software omitted to insert the Reply-To header.

-----Original Message-----
From: Axel-Stéphane SMORGRAV 
Sent: Monday, July 10, 2006 8:23 AM
To: 'Ravish Agarwal'
Subject: RE: [users@httpd] Re: problem with mod_rewrite rewiterule with [P](internal proxying)



The entry in the rewrite log that says "go-ahead with proxy request", indicates that the request is indeed proxied through to mgtpdma3.rau.valmet.com:7003. Now what you need to do is check the logs on mgtpdma3.rau.valmet.com:7003 to see if the request actually came through. If it did, what was the URL requested, and do the error logs say anything that would give a clue about why it returned a 404 ?

-ascs

-----Original Message-----
From: Ravish Agarwal [mailto:Ravish_Agarwal@xxxxxxxxxxx]
Sent: Friday, July 07, 2006 5:03 PM
To: users@xxxxxxxxxxxxxxxx
Cc: Axel-Stéphane SMORGRAV
Subject: RE: [users@httpd] Re: problem with mod_rewrite rewiterule with [P](internal proxying)


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.



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