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

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

 



Seems like your rewrite rules are working perfectly! What I am guessing is happening, is that your login.jsp issues a redirect, and that the request to this new location returns the 404. In addition to your rewrite logs, your should take a look in your error and access logs to see if you can find any clue. Another thing you may want to do is to trace all the interactions between the browser and the reverse proxy using something like LiveHTTPHeaders (with Firefox) or HTTPWatch (with IE). That will tell you exactly what is going on.

-ascs


-----Original Message-----
From: Ravish Agarwal [mailto:ravish.agarwal@xxxxxxxxx] 
Sent: Friday, July 07, 2006 9:11 AM
To: users@xxxxxxxxxxxxxxxx
Subject: [users@httpd] problem with mod_rewrite rewiterule with [P](internal proxying)

Hi All,



We are using apache WebServer version 2.0.55 on HP-UX version 11iand we are trying to redirect the requests to another WebServer on the same host



We have made the following entries in the httpd.conf file.



ProxyRequests On

ProxyPass /metso http://mgtpdma3.rau.valmet.com:7003/metso



ProxyPassReverse /metso http://mgtpdma3.rau.valmet.com:7003/metso

SetEnv proxy-nokeepalive 1

ProxyPreserveHost On

RewriteCond %{REQUEST_URI}
(.*\.jsp$)|(.*/servlet/.*)|(.*/workspace/.*)|(.*\.do$)

RewriteRule ^/metso/(.*) http://mgtpdma3.rau.valmet.com:7003/metso/$1 [P].





But this returns the http-404 message. Entries in the rewrite.log says

192.168.251.204 - - [06/Jul/2006:13:08:21 +0300] [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (2) init rewrite engine with requested uri /metso/login.jsp

192.168.251.204 - - [06/Jul/2006:13:08:21 +0300] [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (3) applying pattern '^/metso/(.*)' to uri '/metso/login.jsp'

192.168.251.204 - - [06/Jul/2006:13:08:21 +0300] [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (2) rewrite /metso/login.jsp -> http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp

192.168.251.204 - - [06/Jul/2006:13:08:21 +0300] [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (2) forcing proxy-throughput with http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp

192.168.251.204 - - [06/Jul/2006:13:08:21 +0300] [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (1) go-ahead with proxy request proxy:http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp [OK]



But the loging page is not shown at all.



However it we remove the [P] tag. Then the external redirection works fine. But our requirement is to do the redirection through internal proxy so that end-user does know about the same.

 httpd -I shows the following output.
$ ./httpd -l
Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_so.c
Do we need to have mod_proxy.c as a compiled module for this functionality with apache 2.0.55???

Please help me out.



Thanks and regards

Ravish.



--
Thank and Regards
Ravish Agarwal

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


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