This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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: 18152
52
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
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 ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic