How to set ssl-variables for app in server?

Hi community,

I want to ask, if you have a tip for me, how I should set ssl, when I deploy an app and push to server? Now, I have a variable to my certificate in java runtime argument, but the path to it, is just local.
I need to use this certificate also, when I build a .war file.

Thanks

Your question is not clear on the requirement or the technologies your using so I will make the assumption that you are trying to secure your application using https on port 443. You would like your app to be accessed at url something like https://www.mysite.com/app?

If you are wanting to get a https web server up, you can use elements of this recipe. Note, download the install.sh file for the actual commands. The recipe is for Ubuntu, Apache + Tomcat + mod-jk and Lets Encrypt (for certs) and it’s a recipe so you will use the pieces needed for your requirement.

You do not have to anything special in your gradle.build as Apache handles the ssl certs and mod-jk will communicate from Apache to Tomcat. i.e. Apache uses https on port 443 and Tomcat runs using http on port 8080. Apache is a reverse proxy with mod-jk connecting Apache to Tomcat.

Cheers,

Ian

1 Like

See also this excellent tutorial: How To Encrypt Tomcat 8 Connections with Apache or Nginx on Ubuntu 16.04 | DigitalOcean

2 Likes