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

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.

×
1 answer

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

by Hazel Virdó
by Kathleen Juell
In this tutorial, we will show you how to use Let's Encrypt to obtain a free SSL certificate and use it with Nginx on Ubuntu 18.04. We will also show you how to automatically renew your SSL certificate. If you're running a different web server, simply follow your web server's documentation to learn how to use the certificate with your setup.
Submit an Answer