用户工具

站点工具


setup_https_with_nginx_and_letsencrypt

**这是本文档旧的修订版!**

注意:以下都是以ubuntu 16.04 环境为例子, 默认安装好了nginx

关闭本机的80和443端口占用程序

systemctl stop nginx

安装 letsencrypt

add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install python-certbot-nginx

生成ssl的秘钥

cd /etc/nginx
mkdir ssl
cd /etc/nginx/ssl
openssl dhparam -out dhparam.pem 2048

生成letsencrypt的证书

certbot certonly --standalone --email <xxx>@<xxxmail.com> -d <xxx>.com -d www.<xxx>.com

nginx 80 和443的配置文件

setup_https_with_nginx_and_letsencrypt.1516012027.txt.gz · 最后更改: (外部编辑)