ProxyPass - Trouble getting it working.

Topics: Developer Forum, User Forum
Jun 21, 2010 at 11:45 AM

Good day

I am having difficulty in getting our IIS 6 server to proxy to an Apache internally hosted website. My IIS server is an internet facing web server and i need to allow external users to access the internal web server. I have configured my IIRF.ini as such:

ProxyPass  ^/test/(.*)$*)$1
ProxyPassReverse /test

What I assume should happen is that when internet users got to they should infact be connected to the above address blindly. All I gat back from the Apache server is a generic 404 message. Any ideas? The site is directly accessible from our web server so it is not a F/W issue.

Jun 23, 2010 at 1:21 PM

Yes.  First idea: make sure you are using v2.1 of IIRF. 

Initially I added Proxy capability to IIRF v2.0, but it was not fully-featured and did not work properly in many circumstances. For example if chunked encoding was used by the proxied site.  And in other cases as well. For example, ProxyPassReverse was not added until v2.1.   

I've solidified the proxy function in IIRF V2.1.  So if you use proxy, then be sure to use IIRF v2.1. 

Sounds like you may already be on v2.1.   If so, I can't say what's happening in your particular situation.  But, I can suggest ways to diagnose.  Get a debugging HTTP proxy tool, something like Fiddler.  (It's free).  With it running, connect to your Apache website.  Save the transaction flows.  Then, do the same, connecting through the IIRF proxy to the Apache website.  Compare them.  This will give you an idea of why you get a 404 in the proxy situation, where you get a 200 (all ok) when connecting directly.  Sometimes it is a simple matter of a cookie, or some other request header that is not present. 

Also, examine the IIRF logfile for statements regarding the flow of the proxy transaction.  Turn logging to level 4.  

These diagnostic tools will give you some insight into what's going wrong with your effort to proxy a website.