Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Ok I have IIS running on port 80, and apache currently running on port 19049. Now the external ports are open to allow traffic over 80 but i want to be able to access the apache pages externally without having to open that port, or specify the port in the URL. A solution I found was to set up the ISAPI rewrite filter http://iirf.codeplex.com/. The idea being that externally I might go www.mydomain.com/Apache, and the isapi filter would internally serve the request (conditional on it being /Apache) to the //localhost:19049 page and route all trafic back and forth (obviously with all other sub paths mapped correctly).

The problem is that altough i can get basic rewrites working, i.e rewrite requests from page1.htm to page2.htm or redirect pages from page1.htm to www.google.com. The problem being the rewrite rule doesnt allow be to send the request to another port, and the redirect rule is effectively just a 301 code (so obviously //localhost:19049 wont work externally).

Does anyone have any real solution to this, surely it shouldnt be this difficult to route a simple request around.

share|improve this question

3 Answers 3

If you rewrite outside of the host, e.g. http://x/ -> http://x:999/, you are asking the client to redirect, which means it will show up on the client side. You need a proxy server to do this. Try Squid, Varnish, mod_proxy.

share|improve this answer

I don't use that filter. But I think that its not the solution you need. You don't need a redirect or rewrite. You need a reverse proxy. There are solution for iis and apache. I can vouch for the apache mod_proxy.

share|improve this answer

IIRF has a ProxyPass directive, that will do what you want. You need v2.0 of IIRF.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.