A
A
account-42017-03-13 20:31:29
Nginx
account-4, 2017-03-13 20:31:29

How to connect SSL Letsencrypt to subdomains?

There is a working site with SSL certificates for example.com and www.example.com.
How now to connect SSL to additional subdomains? Because now the browser knocks out security errors and does not allow subdomains without a certificate.
I generated additional certificates with the command

sudo letsencrypt certonly -a webroot --webroot-path=/home/ubuntu/again/222/static -d new.example.com

What to do next? How to push it into the nginx config?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DiverUA, 2017-03-13
@account-4

In the Server section describing the subdomain, specify
and write the paths to the certificates

ssl_certificate /path/to/chain.pem;
ssl_certificate_key /path/to/privatekey.pem

Nginx supports SNI, everything will work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question