Installing HTTPS on Tomcat 7 with CentOS

Ok, the certificate I had somewhere in my HD worked.

Right now, I’m using the domain mateuscentos7.hopto.org and the HTTPS worked too.
I did these commands:

certbot-auto certonly

cd /etc/letsencrypt/live/mateuscentos7.hopto.org/

openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem

keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks

nano /usr/share/apache-tomcat-7.0.88/conf/server.xml

Edited the Connector to my new keystore.jks file and password
then

service tomcat restart

image

Thank you very much for your time, Sir.
I would send you a cookie, but I still don’t know how to send objets via mail.

Btw, to renew my certificate automatically, how do I use the command ‘certbot-auto certonly’? ‘certbot-auto renew certonly’ maybe?
I was thinking about using a script to to these steps again near the end of the certificate, but I read somewhere that the certbot-auto has an option to renew automatically.

1 Like