D
D
Dadoshik2017-11-26 04:31:49
Nginx
Dadoshik, 2017-11-26 04:31:49

How to properly install an SSL certificate from Comondo on Nginx?

Certificate: Comodo PositiveSSL
Server: Nginx
After purchase and registration, we have: 1. key.key 2. AddTrustExternalCARoot.crt 3. COMODORSAAddTrustCA.crt 4. COMODORSADomainValidationSecureServerCA.crt 5. site_ru.crt I
combine them into one, in this order: site_ru. crt -> COMODORSADomainValidationSecureServerCA.crt -> COMODORSAAddTrustCA.crt -> AddTrustExternalCARoot.crt I
transfer to the server: /etc/ssl/site_ru
I take the server config: /etc/nginx/sites-available/default
And paste:

server {
    listen 443;

    ssl on;
    ssl_certificate /etc/ssl/site_ru/site_ru.crt;
    ssl_certificate_key /etc/ssl/site_ru/ключ.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

}

sudo service nginx configtestproduces fail
Well and sudo service nginx restartaccordingly too.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dadoshik, 2017-11-26
@Dadoshik

I found a bug, it was in the key. When copying the key to a file, for some reason the minuses merged for me -----BEGIN RSA PRIVATE KEY---—Corrected for -----BEGIN RSA PRIVATE KEY-----Everything worked!
In any case, thanks to Boris Syomov and Saboteur for pointing me in the right place. I forget to look at the logs :)

B
Boris Syomov, 2017-11-26
@kotomyava

nginx -t or the error log will give a very specific answer to this question...

A
Alexander Chernykh, 2017-11-26
@sashkets

https://4admin.info/inject-ssl-certificate-comodo/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question