After setting up a LEMP droplet from the marketplace, I noticed there are NGINX config files in the following locations:
/etc/nginx/nginx.conf /etc/nginx/sites-enabled/digitalocean <- (no extension…) /etc/nginx/sites-available/default <- (no extension…) /etc/nginx/sites-available/digitalocean <- (no extension…)
1 LEMP Droplet, 1 Let’s Encrypt SSL Certificate.
Which nginx config file do I edit and if I will only be hosting 1 single website per droplet, how do I generate a certificate for mysite.com, www.mysite.com for this scenario and what should my nginx config file look like?
I think generating it is simple but which of the 4 nginx files is it editing?
Run this command to get a certificate and have Certbot edit your Nginx configuration automatically to serve it, turning on HTTPS access in a single step.
sudo certbot --nginx
I am aware of your sweet load balancer easy to setup ssl options but I cannot afford it right now. This would also be a great opportunity to learn from the community by example and how to do it on my own.
Thank you for any help.
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!
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.