I have followed this tutorial to secure nginx with lets encrypt for this domain and sub domain example.com and www.example.com (my domain instead of example)
Now I have another sub domain something.example.com, it’s pointing to my VPS and I created an ngnix server block to serve static content for it. Now how do I use python-certbot-nginx package to secure the new sub domain?
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.
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.
Hey, I discovered that there is a handy certbot cli command (works on ubuntu 16.04) simply type:
Gives you something like that:
Guys I can’t access my subdomain on http, its shows on https. Here are my nginx config.
Hi ! If you have create your vhost to your subdomain, you have just to do this command :
Install Certbot :
Certificate your subdomain :
It works fine for me. Don’t forget to restart nginx :