Report this

What is the reason for this report?

Letsencrypt for multiple domains on Nginx

Posted on September 10, 2016

I have a Nginx server setup with virtual host. There are many domains are hosted and all the running WordPress websites. Is there any tutorial available to implement Letsencrypt on Nginx virtual host? I want to keep all my website running perfectly. Please share.



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.

Hi, i had trouble with this situation. i hav followed @kamaln7 suggestion but one of my domain cant be accessed because the certificate belong to my other domain. How is the server blocks for each domain? is there any different in listen 443 ssl http2 ? i use this in both :

listen 443 ssl http2 ;
listen [::]:443 ssl http2 ;

I know this is an old post, but if anyone comes and see it @sunapi386 is completely correct with the certonly and the webroot commands. If you are interested on how to do it for multiple domains located in different paths there is a nice example on the certbot user guide https://certbot.eff.org/docs/using.html#webroot

Hi!

Let’s Encrypt is very simple to set up with Nginx. This tutorial will walk you through all the necessary steps to do that.

It is, however, written for setups where there is only one server block present. So, if you replace /etc/nginx/sites-available/default with the correct path for each server block, you should be fine.

At the end of Step 2, a Diffie-Hellman group is generated. Because it is shared between all server blocks, you only need to perform that step once.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.