Reverse Proxy Testing

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 4
Joined: 20 Jul 2012, 17:44

Reverse Proxy Testing

20 Jul 2012, 17:49

ISAPI_Rewrite 3 Full version 3.1.0.79. IIS 7.5.

In my httpd.conf, I have a very simple test line:

RewriteProxy /test123$ http://www.google.co.uk [L]

In theory, http://www.mysite.com/test123 should serve Google content based on a previous poster using that as a test case. I have tried that and a number of different syntax options based on numerous forum posts, but they all result in a blank page (Chrome) or webpage not found (IE) for the client.

Here is the Rewrite.log snippet:

(2) init rewrite engine with requested uri /test
(1) Htaccess process request C:\ISAPI_Rewrite3\httpd.conf
(3) applying pattern '/test$' to uri '/test'
(2) forcing proxy-throughput with http://www.google.co.uk
(1) go-ahead with proxy request http://www.google.co.uk [OK]
(1) Rewrite URL to >> /testx.rwhlp?p=0
(2) rewrite '/test' -> '/testx.rwhlp?p=0'
(2) internal redirect with /testx.rwhlp?p=0 [INTERNAL REDIRECT][/code]

No errors appear in error.log.

Is that syntax correct? Do I need to load the ISAPI_RewriteProxy_x64.dll filter manually or is the ISAPI_Rewrite.dll sufficient? Standard redirects are working without issue in that same config file.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Reverse Proxy Testing

23 Jul 2012, 06:41

Hello,

The syntax is right and the logs looks ok.
- Try checking IIS --> web-server --> ISAPI Restrictions ISAPI_Rewrite is supposed to have ALLOWED.
- Try checking IIS --> your site --> Handler Mappings And see if the ISAPI_rewrite is there. If not, add it.

Regards
Andrew

User avatar
Posts: 4
Joined: 20 Jul 2012, 17:44

Re: Reverse Proxy Testing

25 Jul 2012, 16:29

Thank you - it turns out I did not have the ISAPI Filter for ISAPI_RewriteProxy_x64.dll loaded (this was a manual install). Unfortunately when I added it, I received an error and had to remove it before I could go further:

The HTTP Filter DLL C:\ISAPI_Rewrite3\ISAPI_RewriteProxy_x64.dll failed to load. The data is the error.

The DLL doesn't appear to be corrupt - file signature matches what we have on our other servers.

I upgrade to the latest version (manual install), but receive the same error.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Reverse Proxy Testing

26 Jul 2012, 05:51

"The data is the error." - this means there's not enough permissions to read the .dll file. Please, check permissions

Regards
Andrew

User avatar
Posts: 4
Joined: 20 Jul 2012, 17:44

Re: Reverse Proxy Testing

26 Jul 2012, 12:26

I checked the permissions, even temporarily allowing "Everyone" plus "Network Service" (app pool identity) modify access, but I do not believe that is the case as ISAPI_Rewrite functions without issue, just not the proxy. Scripting is allowed on this site.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Reverse Proxy Testing

27 Jul 2012, 06:02

that error message indicates that:

1) no permissions OR
2) proxy .dll file is actually corrupted OR
3) there're problems with dependencies in the library(to check that you may install http://www.dependencywalker.com/depends22_x64.zip and load proxy .dll file there. There must be no red entries).

The easiest way on your path to resolve this issue - try to re-install ISAPI_Rewrite.

Regards
ANdrew

User avatar
Posts: 4
Joined: 20 Jul 2012, 17:44

Re: Reverse Proxy Testing

27 Jul 2012, 12:38

I reinstalled, this time using the installer and not the manual process. I got back to the part where I need to manually add the ISAPI filter for ISAPI_RewriteProxy_x64.dll and have run into the same issue. Dependency Walker tells me it can't find IEShims.dll. That's simply because, I expect, it's not in the path. If I copy that DLL to the Helicon\ISAPI_Rewrite3 folder, it stops complaining about that, and generates warnings about IEFRAME.DLL > SHLWAPI.DLL missing functions.

However, this blog post: http://stackoverflow.com/questions/9383 ... ing-sharps lists the same functions i'm seeing warnings for. In his case, it is an expected warning. I'm not sure if that's the case here. I have found 1 or 2 other blog posts that note the same functions are often flagged by Dependency Walker.

I do appreciate all the time you've put in helping me nail down this problem. Given the wall we've run into, we may opt for URL Rewrite + ARR for our proxying going forward, but maintain ISAPI_Rewrite for simple rewrites.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Reverse Proxy Testing

30 Jul 2012, 06:36

Please, send a request using our helpdesk and our specialists will connect remotely and fix the issue.

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 5 guests