1 頁 (共 1 頁)

ubuntu 14.04 Let's Encrypt SSL

發表於 : 2017-07-07 15:01:09
yehlu
https://www.digitalocean.com/community/ ... untu-14-04

代碼: 選擇全部

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot

代碼: 選擇全部

sudo certbot certonly --webroot --webroot-path=/home/yehlu/Sites/wp -d hopemarket.com.tw -d www.hopemarket.com.tw


nginx site conf

代碼: 選擇全部

location ~ /.well-known {
        allow all;
}

代碼: 選擇全部

server {
    listen 80;
    server_name hopemarket.net www.hopemarket.net;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name hopemarket.net www.hopemarket.net;
        ssl_certificate /etc/ssl/hopemarket.com.tw_fullchain.pem;
        ssl_certificate_key /etc/ssl/hopemarket.com.tw_privkey.pem;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_dhparam /etc/ssl/dhparam.pem;
        ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
        ssl_session_timeout 1d;
        ssl_session_cache shared:SSL:50m;
        ssl_stapling on;
        ssl_stapling_verify on;
        add_header Strict-Transport-Security max-age=15768000;
}
crontab renew ssl

代碼: 選擇全部

15 3 * * * /usr/bin/certbot renew --quiet --renew-hook "/usr/sbin/service nginx reload"