Відмінності між версіями «Https»
Перейти до навігації
Перейти до пошуку
(Створена сторінка: === https на сервер === [http://habrahabr.ru/post/250931/ Переходим на HTTPS на Nginx: шпаргалка]) |
|||
| Рядок 1: | Рядок 1: | ||
=== https на сервер === | === https на сервер === | ||
[http://habrahabr.ru/post/250931/ Переходим на HTTPS на Nginx: шпаргалка] | [http://habrahabr.ru/post/250931/ Переходим на HTTPS на Nginx: шпаргалка] | ||
| + | |||
| + | '''cloudflare''' | ||
| + | yum install python-pip python-cffi python2-cryptography dnspython python-enum34 python-future -y | ||
| + | yum install python-idna python-ipaddress python-ndg_httpsclient python-pyasn1 python-pycparser pyOpenSSL python-requests python-six python-wheel -y | ||
| + | pip install tld | ||
| + | |||
| + | Installing certbot [https://certbot.eff.org/#centosrhel7-nginx certbot] | ||
| + | yum install certbot -y | ||
| + | |||
| + | |||
| + | [https://github.com/lukas2511/dehydrated dehydrated] - script which handle getting certificates | ||
| + | |||
| + | [https://github.com/kappataumu/letsencrypt-cloudflare-hook hook] which used by dehydrated to contact cloudflare | ||
| + | |||
| + | /etc/cron.d/dehydrated | ||
| + | 0 5 * * * root /usr/local/bin/dehydrated -c &>/var/log/dehydrated.log | ||
| + | |||
| + | /etc/dehydrated/config | ||
| + | CHALLENGETYPE="dns-01" | ||
| + | CERTDIR="${BASEDIR}/certs" | ||
| + | ACCOUNTDIR="${BASEDIR}/accounts" | ||
| + | HOOK=/usr/local/bin/hook.py | ||
| + | |||
| + | export CF_EMAIL='[email protected]' | ||
| + | export CF_KEY='your_cloudflare_API_key' | ||
| + | |||
| + | /etc/dehydrated/domains.txt | ||
| + | example.com www.example.com delta.example.com | ||
Версія за 21:26, 26 січня 2017
https на сервер
Переходим на HTTPS на Nginx: шпаргалка
cloudflare
yum install python-pip python-cffi python2-cryptography dnspython python-enum34 python-future -y yum install python-idna python-ipaddress python-ndg_httpsclient python-pyasn1 python-pycparser pyOpenSSL python-requests python-six python-wheel -y pip install tld
Installing certbot certbot
yum install certbot -y
dehydrated - script which handle getting certificates
hook which used by dehydrated to contact cloudflare
/etc/cron.d/dehydrated
0 5 * * * root /usr/local/bin/dehydrated -c &>/var/log/dehydrated.log
/etc/dehydrated/config
CHALLENGETYPE="dns-01"
CERTDIR="${BASEDIR}/certs"
ACCOUNTDIR="${BASEDIR}/accounts"
HOOK=/usr/local/bin/hook.py
[email protected]
export CF_EMAIL='[email protected]'
export CF_KEY='your_cloudflare_API_key'
/etc/dehydrated/domains.txt
example.com www.example.com delta.example.com