Sagar Shirke
Sagar Shirke

Reputation: 686

How to use port 443 for both IIS and Tomcat on same server for two different applications

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.

Upvotes: 1

Views: 1443

Answers (3)

Lex Li
Lex Li

Reputation: 63123

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://learn.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://docs.lextudio.com/blog/the-rough-history-of-iis-httpplatformhandler/#the-magical-httpplatformhandler

Upvotes: 2

JennyDai
JennyDai

Reputation: 259

You can configure a reverse proxy for IIS, use port 443 as the traffic forwarding port, and set the two different applications to other ports. Because IIS is used as a reverse proxy server, you can use port 443 to forward to by creating a rewrite rule. on two other different application ports.

you can look at this: Proxy IIS Server to Tomcat Application

Upvotes: 1

Ten Du
Ten Du

Reputation: 21

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.

Upvotes: 2

Related Questions