[РЕШЕНО]Как установка ssl apache

Поиск  Пользователи  Правила 
Закрыть
Логин:
Пароль:
Забыли свой пароль?
Регистрация
Войти
 
Страницы: 1
Ответить
[РЕШЕНО]Как установка ssl apache
Публикую  1c - Apache хочу сделать https
Купили сертификат sectig  PositiveSSL Certificate
domain.key
AddTrustExternalCARoot.crt
domain_ru.crt
SectigoRSADomainValidationSecureServerCA.crt
USERTrustRSAAddTrustCA.crt

Что мне делать и как это добавить в apache
Поясню основные моменты:
1. добавляем Listen 443
2. LoadModule ssl_module modules/mod_ssl.so (раскомментируем, убираем #)
3.
И ставим комментарии в следующих строках:
#<IfModule ssl_module>
#SSLRandomSeed startup builtin
#SSLRandomSeed connect builtin
#</IfModule>

4. И добавляем ваш домен(в конец):
<VirtualHost your_domain.ru:443>
SSLEngine On
SSLCertificateFile conf/ssl/domain_ru.crt
SSLCertificateKeyFile conf/ssl/domain.key
SSLCACertificateFile conf/ssl/bundle.crt
</VirtualHost>

Пояснение:
'SSLCertificateFile' is the certificate file for your server (e.g. your_domain_name.crt)
'SSLCertificateKeyFile' is the private key that you generated while creating the CSR
'SSLCertificateChainFile' is the intermediate certificate(s) file provided by your CA. If you have multiple Intermediates, some servers may require you to concatenate the files into one. If this file does not work, try using 'SSLCACertificateFile'.

SSLCertificateChainFile - этот фаил мы создаем сами объединив содержимое 3х оставшихся crt присланных вам., так называемая цепочка.

После этого рестрат.
Setting up a SSL Cert from Comodo nginx


These are the steps I went through to set up an SSL cert.

Purchase the cert
Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You'll be asked for the content of the CSR file when ordering the certificate.

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr
This gives you two files:

example_com.key -- your Private key. You'll need this later to configure ngxinx.
example_com.csr -- Your CSR file.
Now, purchase the certificate [1], follow the steps on their site, and you should soon get an email with your PositiveSSL Certificate. It contains a zip file with the following:

Root CA Certificate - AddTrustExternalCARoot.crt
Intermediate CA Certificate - COMODORSAAddTrustCA.crt
Intermediate CA Certificate - COMODORSADomainValidationSecureServerCA.crt
Your PositiveSSL Certificate - www_example_com.crt (or the subdomain you gave them)
Install the Commodo SSL cert
Combine everything for nginx [2]:

Combine the above crt files into a bundle (the order matters, here):

cat www_example_com.crt COMODORSADomainValidationSecureServerCA.crt  COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ssl-bundle.crt
Store the bundle wherever nginx expects to find it:

mkdir -p /etc/nginx/ssl/example_com/
mv ssl-bundle.crt /etc/nginx/ssl/example_com/
Ensure your private key is somewhere nginx can read it, as well.:

mv example_com.key /etc/nginx/ssl/example_com/
Make sure your nginx config points to the right cert file and to the private key you generated earlier:

server {
   listen 443;

   ssl on;
   ssl_certificate /etc/nginx/ssl/example_com/ssl-bundle.crt;
   ssl_certificate_key /etc/nginx/ssl/example_com/example_com.key;

   # side note: only use TLS since SSLv2 and SSLv3 have had recent vulnerabilities
   ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

   # ...

}
Restart nginx.
Страницы: 1
Ответить
Форма ответов
 
Текст сообщения*
:) ;) :D 8) :( :| :cry: :evil: :o :oops: :{} :?: :!: :idea:
Защита от автоматических сообщений. Введите символы, изображенные на этой картинке в поле ввода &quote;Код подтверждения&quote;.