Показаны сообщения с ярлыком letsencrypt. Показать все сообщения
Показаны сообщения с ярлыком letsencrypt. Показать все сообщения

пятница, 16 июня 2017 г.

Установка SSL сертификата Let's Encrypt на ubuntu

$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install python-certbot-nginx


Установка по виртуальным хостам из конфига nginx

certbot --nginx

Обновление

certbot renew --dry-run

Установка в ручную для доменов

sudo certbot certonly --webroot -w /var/www/site.org -d site.org -d www.site.org -d auto.site.org

и т.д

Отблагодарить можно через форму справа "Donate" ... )

To reward you via the form on the right "Donate" ... )

:)

пятница, 9 сентября 2016 г.

Создание сертификата letsencrypt и прописывание его на сервере с NGINX


Все по инструкции

https://certbot.eff.org/#ubuntutrusty-nginx
-------------------

wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto

./certbot-auto certonly --webroot -w /var/www/site.net -d site.net -d www.site.net


конфиг NGINX

server {

listen 443 ssl;
listen [::]:443 ssl;
listen 80;
listen [::]:80;

.........

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers  "HIGH:!RC4:!aNULL:!MD5:!kEDH";
add_header Strict-Transport-Security 'max-age=604800';

ssl_certificate /etc/letsencrypt/live/site.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/site.net/privkey.pem;
...............

}

service nginx restart


UPDATE sertificate 


sudo ./certbot-auto renew

Отблагодарить можно через форму справа "Donate" ... )

To reward you via the form on the right "Donate" ... )

:)

среда, 31 августа 2016 г.

Конфигурация NGINX для letsencrypt



Добавляем для нужных хостов




# Include location directive for Let's Encrypt ACME Challenge
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;


#############################################################################
# Configuration file for Let's Encrypt ACME Challenge location
# This file is already included in listen_xxx.conf files.
# Do NOT include it separately!
#############################################################################
#
# This config enables to access /.well-known/acme-challenge/xxxxxxxxxxx
# on all our sites (HTTP), including all subdomains.
# This is required by ACME Challenge (webroot authentication).
# You can check that this location is working by placing ping.txt here:
# /var/www/letsencrypt/.well-known/acme-challenge/ping.txt
# And pointing your browser to:
# http://xxx.domain.tld/.well-known/acme-challenge/ping.txt
#
# Sources:
# https://community.letsencrypt.org/t/howto-easy-cert-generation-and-renewal-with-nginx/3491
#
#############################################################################

# Rule for legitimate ACME Challenge requests (like /.well-known/acme-challenge/xxxxxxxxx)
# We use ^~ here, so that we don't check other regexes (for speed-up). We actually MUST cancel
# other regex checks, because in our other config files have regex rule that denies access to files with dotted names.
location ^~ /.well-known/acme-challenge/ {

    # Set correct content type. According to this:
    # https://community.letsencrypt.org/t/using-the-webroot-domain-verification-method/1445/29
    # Current specification requires "text/plain" or no content header at all.
    # It seems that "text/plain" is a safe option.
    default_type "text/plain";

    # This directory must be the same as in /etc/letsencrypt/cli.ini
    # as "webroot-path" parameter. Also don't forget to set "authenticator" parameter
    # there to "webroot".
    # Do NOT use alias, use root! Target directory is located here:
    # /var/www/common/letsencrypt/.well-known/acme-challenge/
    root         /var/www/letsencrypt;
}

# Hide /acme-challenge subdirectory and return 404 on all requests.
# It is somewhat more secure than letting Nginx return 403.
# Ending slash is important!
location = /.well-known/acme-challenge/ {
    return 404;
}

Отблагодарить можно через форму справа "Donate" ... )

To reward you via the form on the right "Donate" ... )

:)

друзья )

Сохраняйте и делитесь желаниями, и не забывайте о важных датах!