Now the online spread of the implementation of IIS and Tomcat sharing 80 port is based on the Isapi_redirect plug-in implementation, my implementation method is different, the principle is similar, with better advantages.
First of all, based on the Isapi_redirect disadvantage, the Java project as a virtual directory under IIS exists, the project under IIS uses the top-level domain name, the project under Tomcat can only be accessed as a level two directory;
For example, if the project under IIS uses Www.iisproject.com Access, the items under Tomcat can only be accessed www.iisproject.com/tomcatproject so that it becomes unfriendly .
My implementation, using IIS's application request to Route ARR (application request route), to enable forward requests.
"Common 80 port" signal
Approximate steps (arr use please refer to the previous article or self-Baidu), install ARR on IIS, configure 2 server farm (IIS app uses one iisfarm,tomcat with one tomcatfarm), each server There is only one machine in the farm, localhost, and the port uses its own application port (for example, IIS apps use the 8080,tomcat app using 8090), and each server farm sets the URL rewrite routing rules rule, The rules are forwarded to different serverfarm processing according to the different access URLs.
Scenario one uses a different domain name to access
An app domain name under IIS is Www.iisproject.com, and one of the app domain names under Tomcat is www.tomcatproject.com.
Routing rules used by Iisfarm.
According to the settings, only HTTP requests for 80 ports under the www.iisproject.com domain name IIS will be handed to iisfarm in arr for processing, iisfarm only localhost:8080 machines, That is, the IIS application that forwarded to port 8080 is responsible for processing.
Tomcatfarm Routing Rules settings
Similarly, HTTP requests for 80 ports under the www.tomcatproject.com domain name IIS will be handed to tomcatfarm in arr for processing, tomcatfarm only localhost:8090 servers, Tomcat works on port 8090, so the request is tomcat in process.
Scenario two uses level two directory access
Scenario one uses 2 different domain names, if there is only one domain name or no domain name, we also have the means, is to use the domain name/two level directory or ip/two directory to achieve access, such as Www.project.com/iis,www.project.com/tomcat Or 192.168.0.10/iisproject, 192.168.0.10/tomcatproject way. Implementation mode and scene is almost the same, just configure routing rules, the URL is www.project.com/iis beginning to the iisfarm processing, www.project.com/tomcat to the beginning of the handing over to tomcatfarm processing, Can be done by regular expressions, wildcard characters.
Above two scenarios, whether using domain name access, or using level two directory access, it appears to the external client that IIS applications and Tomcat applications share 80 ports for the purpose .
Using IIS App request forwarding arr for IIS and Tomcat consolidation common 80 ports