Certbot with Tomcat9

i've set up the https on apache http server (port 80) along with webmin (port 10000) using let's encrypt. i've installed tomcat9 on the same server and it's listening to port 8080 (http). tomcat9 server also works fine. i am trying to set up the https for tomcat9. i've copied cert1.pem, chain1.pem, and privkey.pem from /etc/letsencrypt/archive/{domain.com} folder into /etc/tomcat9 folder. Also updated server.xml by uncommenting "connector port="8443" section and put the locations of the pem files on the certificate section. i've restarted the tomcat9 service. When i go to http://mydomain.com:8080, it shows the tomcat webpage. if i do https://mydomain.com:8080 or https://mydomain.com:8443, i get ERR_COMMECTION_REFUSED. iptable -L -n -v shows the port 8443 to accept. Can you help?

1 Reply

You may need to adjust your server.xml file to enable Tomcat for SSL use. There are some recommendations in this guide. Essentially, you'd need to add a line in server.xml that states the locations of your SSL information, and set your connector ports to 443. The error that you're seeing (Connection Refused) is most likely related specifically to the connector ports set up in server.xml; you might find this StackOverflow post to help as well.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct