Welcome! Log In Create A New Profile

Advanced

https://letsencrypt.org/

Gena Makhomed
October 14, 2016 08:30AM
On 14.10.2016 13:16, avk wrote:

>Сабдомейны использовать не можем,
> потому что нет вильдкард сертификата. Может быть есть идеи?

https://letsencrypt.org/ - бесплатные SSL сертификаты.

конфиг nginx:

location /.well-known/acme-challenge {
default_type text/plain;
root /opt/letsencrypt;
}

получение сертификата:

#!/bin/bash

OPT="-a webroot --webroot-path=/opt/letsencrypt --agree-dev-preview"
/opt/letsencrypt/letsencrypt-auto $OPT certonly -d example.com -d
www.example.com

обновление сертификата: (запускать через крон)

#!/bin/sh

if ! /opt/letsencrypt/letsencrypt-auto renew -nvv --webroot
--webroot-path=/opt/letsencrypt > /var/log/letsencrypt/renew.log 2>&1 ; then
echo Automated renewal failed:
cat /var/log/letsencrypt/renew.log
fi

systemctl reload nginx

exit

использование:

listen 11.22.33.44:443 ssl http2;

server_name www.example.com example.com;

ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

# https://gist.github.com/plentz/6737338
# http://tautt.com/best-nginx-configuration-for-security/
add_header Strict-Transport-Security "max-age=31536000" always;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options DENY;

проверка:

https://www.ssllabs.com/ssltest/

--
Best regards,
Gena

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

https://letsencrypt.org/

Gena Makhomed October 14, 2016 08:30AM

Re: https://letsencrypt.org/

avk October 14, 2016 10:32AM

proxy pass для subfolders

Gena Makhomed October 14, 2016 11:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 288
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready