Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Use port 8080 on HTTPS  RSS feed

 
Harris Chiam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had configured tomcat for SSL. Whenever i first enter the URL (e.g https://IP:8080/jasperserver-pro/), it will always auto redirect to (https://IP:8443/jasperserver-pro/). Then I have to manually change the port on the URL to access. Is there a way to disable the redirect??

Below are the setting on server.xml
 
Tim Holloway
Saloon Keeper
Posts: 18636
70
Android Eclipse IDE Linux
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Harris!

You should not use port 8080 for https traffic. That port is conventionally used for non-secured data, akin to the use of port 80 for default external http.

Port 8443 is the standard for Tomcat secured (SSL/TLS) data, corresponding to the common HTTPS port 443.

You cannot use the same port for both http and https. Unlike some other types of servers, webservers do not negotiate encryption. If it's encrypted (https), it must be sent to 443/8443. If it's plain text (http) it must be sent to 80/8080.

The default setting for tomcat's server.xml file reflect those standards.

The requirement for a given URL to be http or https is determined by your transport security rules that you set up in the webapp's WEB-INF/web.xml file.
 
Harris Chiam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim, thanks for your great explanation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!