Home > Back-end >  How to use port 443 for both IIS and Tomcat on same server for two different applications
How to use port 443 for both IIS and Tomcat on same server for two different applications

Time:07-12

We are having an application server , we need to host .Net Web api with secure HTTPS link on port 443 using IIS , also a front application (using JAVA) in Tomcat with secured HTTPS link on same 443 port.

We deployed Java front end in tomcat with 443 port but now when tried to start a site in IIS on same port 443 it is not starting since port already in use.

So what steps can be taken so that we will have two different application hosted in IIS and Tomcat with using same 443 port.

CodePudding user response:

Deploy a reverse proxy server(Nginx, Apache or else) with port 443 , IIS and Tomcat use other port. Config the proxy server to proxy the traffic of IIS and Tomcat.

CodePudding user response:

First, let IIS be the web server that takes all traffic.

Second, configure all your sites on IIS at port 443. SNI support in IIS 8 allows you to host multiple HTTPS sites on the same machine,

https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-server-name-indication-sni-ssl-scalability

Third, if one of the sites is Java/Tomcat based, use HttpPlatformHandler to forward its traffic to Tomcat (let IIS control which port Tomcat should use),

https://stackoverflow.com/tags/httpplatformhandler/info

CodePudding user response:

We have many SPA APP with their API in the same IIS site.

We create a IIS site (with the desired port) and create two Virtual Applications(one for SPA and one for API).

You can create a virtual application by right click on the IIS site.

  • Related