Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to configure tomcat - 8080 for HTTP & 8181 for HTTPS

 
Robert Jack
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I deploy sample.war in my tomcat6.0.

I want to access

http://localhost:8080/sample/

https://localhost:8181/sample/

Is possible? if possible, how can i change my configuration?

This is my ../tomcat/conf/server.xml



Help me.
Thanks in advance
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18025
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Port 8080 is the default setting for HTTP with Tomcat. For HTTPS, the default setting is 8443, corresponding to the HTTPS default port of 443. So to use 8181 instead, just change the "8443"s in the Tomcat server.xml to "8181"s.

Of course you also have to setup the keystore in the usual way before you can do HTTPS at all, but that's a different matter.
 
Robert Jack
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now modified my tomcat/conf/server.xml.
i got the following message in my browser when i try https://localhost:8181/
'Unable to connect
Firefox can't establish a connection to the server at localhost:8181.
"

 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you restarted Tomcat after making this change and doing everything else outlined in http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic