Question

Self-signed certificate for droplet

Hi,

I have a droplet running Spring Boot application. What is the most painless way to setup SSL for it? Is there general option where I can drop in certificate or do I have to configure nginx or apache?

Thanks

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Indeed, what I could suggest is setting up Nginx as a reverse proxy that way you could use Let’s Encrypt to secure your installation.

Your Nginx reverse proxy server block would look something like this:

server {
        listen 80;
        listen [::]:80;

        server_name your_domain.com;

        location / {
             proxy_pass http://localhost:8080/;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header X-Forwarded-Proto $scheme;
             proxy_set_header X-Forwarded-Port $server_port;
        }
}

Then you could follow the steps here on how to setup Let’s Encrypt:

https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04

Hope that this helps. Regards, Bobby