开发者

Reverse Proxy on Windows

I have a web server that responds to a number of different sites on port 80. Currently, IIS does the mapping to various sites via host headers, but I'd like to be able to serve other web apps on port 80 hosted in Jetty or Tomcat. IIS prevents that by grabbing all port 80 traffic.

I basically need a reverse proxy to just change the port number to something that another app stack can listen in on. I was looking into nginx开发者_运维技巧 but it seems to not be quite ready for prime time on Windows. Eventually I may set up a Linux box specifically for this, but for now I'm interested in a solution which will run all on the same box.

All I really need is something very light which mostly just matches hostname/port and allows rewriting of the port. Does anyone have any suggestions?


If you are running in IIS 7 or above you can use Application Request Routing for that: http://www.iis.net/download/ApplicationRequestRouting


For IIS 5-6, it looks like Apache Tomcat Connector (JK 1.2) is a clean solution. This is an IIS ISAPI filter which allows IIS to act as a reverse proxy for other web servers. It uses Apache JServ Protocol (AJP) to communicate with the app server actually serving requests. Both Tomcat and Jetty implement AJP. URLs are mapped with regex-like config to a particular AJP server instance.

  • Overview: http://www.iisadmin.co.uk/?p=40&page=3
  • IIS Config: http://tomcat.apache.org/connectors-doc/reference/iis.html
  • Mapping Config: http://tomcat.apache.org/connectors-doc/reference/workers.html

This ISAPI plug-in also works with IIS 7.x, but in that case the Application Request Routing (see marked answer) should be considered as it might work better with non-AJP servers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜