1

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.

3 Answers3

1

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.

0

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.

Igal Serban
  • 1,575
  • 10
  • 6
0

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

Cheeso
  • 572
  • 3
  • 18