Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: isapi_rewrite 2 + tomcat’s isapi_redirect Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
hurr
Newbie
Newbie


Joined: 05 December 2006
Online Status: Offline
Posts: 33
Posted: 11 August 2008 at 3:45am | IP Logged Quote hurr

Hi there,

My organization is currently (still) using isapi_rewrite version 2, together with Tomcat's isapi_redirect, to proxy Tomcat requests using its own proprietary protocol. Servers are Windows 2000.

Isapi_rewrite is installed globally, while isapi_redirect is installed on the site level. Everything works perfectly and no problems since years.

Isapi_redirect works quite similarly to isapi_rewrite, it just needs a list of aliases mapped to specific applications. I always assumed with the above setup that isapi_rewrite has precedence over isapi_redirect.

The problem is: if I try to map on top of the httpd.ini file
Code:

RewriteProxy (/.*)? http://[another server IP here]:80$1 [H,I,U]
everything gets redirected EXCEPT the requests supposed to be redirected to Tomcat (=handled by isapi_redirect).
I get the above requests on the original IIS server with entries like:
Code:
 
 GET /<tomcatappname>/<filename>x.isrwhlp

After adding and removing all the isapis and changing their order, my guess is that every alias mapped towards Tomcat do not have a .isrwhlp mapping on IIS.
I tried adding an application with the same name under IIS, but this did not solve the problem.

I wonder if there is a way to overcome this behaviour, or if it is just by design.

Thank you in advance,
h.

 

 

Back to Top View hurr's Profile Search for other posts by hurr
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7598
Posted: 11 August 2008 at 12:20pm | IP Logged Quote Lexey

Sorry, but I have not got an idea. What is the problem?
Back to Top View Lexey's Profile Search for other posts by Lexey
 
hurr
Newbie
Newbie


Joined: 05 December 2006
Online Status: Offline
Posts: 33
Posted: 11 August 2008 at 1:55pm | IP Logged Quote hurr

Hi Lexey,

I probably used the wrong words.

We are using your isapi_rewrite and Apache Tomcat's isapi_redirect.

Every time I try to proxy to another IIS machine, everything gets proxied correctly - except the stuff handled by Tomcat's isapi_redirect.
In this latter case, isapi_rewrite rewrites the request to (sample from source IIS machine's log)
GET /<tomcatappname>/<filename>x.isrwhlp
but this request does not get proxied to the second IIS machine.
Instead, the request is passed over isapi_redirect on the first machine and redirected to Tomcat, that obviously gives a 404.

Note that
1 - isapi_rewrite has precedence over Tomcat's isapi_redirect
2 - there is no double installation of isapi_rewrite

Let me know if I was clearer now :-)

h.

 

Back to Top View hurr's Profile Search for other posts by hurr
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7598
Posted: 12 August 2008 at 2:00pm | IP Logged Quote Lexey

You need to exclude URIs with .isrwhlp extension from isapi_redirect processing.
Back to Top View Lexey's Profile Search for other posts by Lexey
 
hurr
Newbie
Newbie


Joined: 05 December 2006
Online Status: Offline
Posts: 33
Posted: 12 August 2008 at 4:25pm | IP Logged Quote hurr

Lexey,

Thanks, this works, and guess: I can even use wildcards with latest versions of isapi_redirect :-)

I imagine the explanation is that the request has to arrive to IIS to be handled by the proxy module, so it needed an exclusion for this.

Great job, as usual.

Cheers,
h.

 

Back to Top View hurr's Profile Search for other posts by hurr
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7598
Posted: 13 August 2008 at 5:46am | IP Logged Quote Lexey

Quote:
I imagine the explanation is that the request has to arrive to IIS to be handled by the proxy module, so it needed an exclusion for this.


Almost right. Precisely request should reach application handler invocation stage (where ISAPI_Rewrite's proxy module runs) but ISAPI filters (including isapi_redirect) are running on earlier processing stages. So, they could break intended processing chain.
Back to Top View Lexey's Profile Search for other posts by Lexey
 
hurr
Newbie
Newbie


Joined: 05 December 2006
Online Status: Offline
Posts: 33
Posted: 13 August 2008 at 5:45pm | IP Logged Quote hurr

Would it happen the same if the proxy module was installed as an absolute URI (like /isrwhlp/rwhelper.dll) instead of the .isrwhlp script map?


Back to Top View hurr's Profile Search for other posts by hurr
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7598
Posted: 27 August 2008 at 2:42pm | IP Logged Quote Lexey

Yes the same will happen. The only difference will be that a requested URI will be /isrwhlp/rwhelper.dll instead of /something.isrwhlp
Back to Top View Lexey's Profile Search for other posts by Lexey
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum