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.
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 16.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.