II6 port proxypass help!

Topics: Developer Forum, User Forum
Sep 22, 2010 at 11:32 PM

I am working on windows server 2003 and I have set up a rails application under mongrel in port 3010. So going to http://localhost:3010 goes to my application. Now i would like to map that application to IIS so that when someone hits my server  on a specific domain name it automatically runs the mongrel application. 

I set up the public folder as a website in IIS6 and followed all of the instructions to get the isapi filter, etc. I know the filter works because I can see the log changing it, however it is not working.

The outside world will be hitting the site on port 80, so i tried

 

RewriteLog c:\logs\iirf

RewriteLogLevel 1

IterationLimit 10

MaxMatchCount 10

RewriteEngine ON

StatusInquiry ON

ProxyPass ^/(.*)$  http://localhost:3010/$1

ProxyPassReverse / http://localhost:3010/

 

However I keep getting 404 errors when hitting a non-static page. In my log it shows.

 

2010-09-22 23:30:42 W3SVC1505858623 127.0.0.1 GET /500.html - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.2;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729;+.NET4.0C;+.NET4.0E) 200 0 02010-09-22 23:30:42 W3SVC1505858623 127.0.0.1 GET /500.html - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.2;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729;+.NET4.0C;+.NET4.0E) 304 0 02010-09-22 23:30:47 W3SVC1505858623 127.0.0.1 GET /test - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.2;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729;+.NET4.0C;+.NET4.0E) 404 0 2

 

The static 500.html file is working, but my other page isn't and it appears that it's trying to get it from port 80 instead of port 3010 as i specified. 

How can i force all my hits from port 80 to hit my mongrel server on port 3010?

 

Thanks :)

Sep 23, 2010 at 12:57 AM

Thank goodness....i figured it out.

 

For some reason it didn't like localhost, but as soon as i changed it to 127.0.0.1 it started working. So bizarre :p

Coordinator
Oct 1, 2010 at 12:53 AM
Glad you figured it out. Iirf should handle localhost as a shortcut name. I'll file a bug.
Coordinator
Oct 1, 2010 at 12:56 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.