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


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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