problem using ProxyPassReverse

Topics: Developer Forum, Project Management Forum, User Forum
Jul 20, 2010 at 3:35 PM

Hi

great tool!

I have an issue using the proxypassreverse.

I am running under win server 2003/IIS6, fully patched etc

I installed ionic IIRF V2.1.1.23.  It installed no problem, and I can see it is 'mostly' working just fine.

 

My IIRFFlobal.ini is as follows:

RewriteEngine ON

RewriteFilterPriority HIGH

NotifyLog OFF

 

My IIRF.ini file in my c:\inetpub\wwwroot folder is as follows:

RewriteLog  c:\temp\iirfLog.out

RewriteLogLevel 5

StatusInquiry ON

RedirectRule     ^/redmine$  /redmine/  [I]

ProxyPass     ^/redmine/(.*)$    http://localhost:3000/$1  [I]

ProxyPassReverse   /redmine/          http://localhost:3000 

 

As you can see, I am trying to fwd requests to redmine (item tracking system) which is running via mongrel on port 3000.  I can send the requests fine, but some pages (e.g. the sign out page) returns a url which the ProxtPassReverse seems to mis handle.

 

It appears that it drops a cr/lf from the headers, and the resulting URL when I signout is as follows:

 

http://development.fugro/redmine/X-Runtime:%20125

 

As you can see, the 'X-Runtime...' is part of the header, not the URL.  

 

If I bypass IIS+IIRF and access the redmine site direclty, all is well, which leads me to be suspicious of the proxypassreverse.

 

q: is this a bug in the beta version?

 

many thanks

Jul 21, 2010 at 1:47 PM
Edited Jul 21, 2010 at 1:48 PM
Actually just noticed that you are using 2.1.1 version. Never mind.
Jul 22, 2010 at 12:13 PM
Hi... I have been trying to do the same and but tried first using fastcgi but couldn't make it work... reason why started looking at IIRS Anyway, this following post is another person having the same issue: http://iirf.codeplex.com/workitem/28074 And he fixed using RedirectRule ^/(.*)X-Runtime:(.*)$ /$1 [L] Let me know if this sorts your issue Cheers Doug
Jul 22, 2010 at 3:11 PM
Edited Jul 22, 2010 at 3:13 PM
Hi dx, yes, I can confirm this works. This really helps me. Many thanks. I had to place the redirect above the proxy pass for this to work, but all seems well. RedirectRule ^/redmine$ /redmine/ [I] RedirectRule ^/(.*)X-Runtime:(.*)$ /$1 [L] ProxyPass ^/redmine/(.*)$ http://localhost:3000/$1 [I] ProxyPassReverse /redmine/ http://localhost:3000/ ProxyPassReverse /redmine/ http://localhost/ once again, many thanks for the workaround. regards pk
Aug 27, 2010 at 6:23 AM

Hi,

I've uploaded a patch that should fix this issue by ensuring the missing cr/lf is added to the "Location:" header.  If you're able to compile a new version of the dll, grab my updated Proxy.c file and try it.  I hope this helps someone else as this issue was really annoying me!

- David

 

Sep 3, 2010 at 1:38 AM

David, I can confirm that your patch for the Proxy.c works great! I've just tried it today and it fixed my problem. Thank you very much.