Do Spring Boot applications with embedded tomcat web servers that run on top of IIS as an executed JAR file always require specifying the port in the URL in order to hit the application in the browser?
Is it possible to remove the port from the URL for a Spring Boot application using an embedded Tomcat web server that is running on Windows IIS?
3.5k views Asked by Wilroy Jetson At
2
All the production application url does not have port number in its url, either it runs on internal network or public web. On the other hand java based application servers runs on ports other than 80, for instance tomcat runs on 8080 by default. We can change the default port of tomcat to 80 but we use a web server like nginx and make it run on port 80 and forward the request to tomcat or java application server.
There are following benefits of using a web/proxy server like nginx which runs on port 80 instead of changing the tomcat or application server's port to 80.
The following thread explains about forwarding request from nginx to tomcat.
Nginx configuration to pass site directly to tomcat webapp with context