sh Letsencrypt nginx / Ubuntu 16.04 lts / https://certbot.eff.org/#ubuntuxenial-nginx

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Letsencrypt nginx / Ubuntu 16.04 lts / https://certbot.eff.org/#ubuntuxenial-nginx相关的知识,希望对你有一定的参考价值。

# put in nginx server block, The Webroot plugin works by placing a special file 
# in the /.well-known directory within your document root, which can be opened 
# (through your web server)
location ~ /.well-known {
        allow all;
}

# generating new cert with webroot
sudo letsencrypt certonly --webroot -w /srv/www/domain -d domain.com -d www.domain.com

# cert.pem: Your domain's certificate
# chain.pem: The Let's Encrypt chain certificate
# fullchain.pem: cert.pem and chain.pem combined
# privkey.pem: Your certificate's private key

# letsencrypt in a root cron tab
# letsnecrypt renewal
0 0 * * * letsencrypt renew >> /home/alexander/le-renew.log && service nginx reload

# removing certs
sudo letsencrypt revoke -d domain.com -d www.domain.com --cert-path /etc/letsencrypt/live/domain.com/cert.pem

# then remove actual files
sudo rm -rf /etc/letsencrypt/live/${DOMAIN}
sudo rm /etc/letsencrypt/renewal/${DOMAIN}.conf

以上是关于sh Letsencrypt nginx / Ubuntu 16.04 lts / https://certbot.eff.org/#ubuntuxenial-nginx的主要内容,如果未能解决你的问题,请参考以下文章

为微信小程序开发做准备,在Centos 6.8下利用letsencrypt.sh脚本为nginx 配置免费https证书

Linux下安全证书申请以及配置到Nginx

sh letsencrypt-Docker.sh

sh 使用没有root的acme.sh设置LetsEncrypt

sh 我的Automated LetsEncrypt更新程序的第一次修订为ZNC和朋友使用letsencrypt工具

sh softethervpn_letsencrypt_cert_autoupdate.sh