成长值: 15613
2444
2544
7万
管理员
Let’s Encrypt 是互联网安全研究组织 (ISRG) 提供的免费证书认证机构。它提供了一种轻松自动的方式来获取免费的 SSL/TLS 证书 - 这是在 Web 服务器上启用加密和 HTTPS 流量的必要步骤。获取和安装证书的大多数步骤可以通过使用名为 Certbot 的工具进行自动化。 -- Giuseppe Molica
本文导航 -什么是 Let’s Encrypt …… 01% -安装 Certbot …… 12% -获得证书 …… 22%
-在 NGINX 上配置 SSL/TLS …… 62%
-总结 …… 87%
编译自: https://www.unixmen.com/encryption-secure-nginx-web-server-ubuntu-16-04/ 作者: Giuseppe Molica 译者: geekpi
# add-apt-repository ppa:certbot/certbot
# apt-get update
# apt-get install certbot
# $EDITOR /etc/nginx/sites-available/default
location ~ /.well-known { allow all; }
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
# systemctl restart nginx
# certbot certonly --webroot --webroot-path=/var/www/html -d www.example.com
# $EDITOR /etc/nginx/snippets/secure-example.conf
ssl_certificate /etc/letsencrypt/live/domain_name/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/domain_name/privkey.pem;
server { listen 80 default_server; listen [::]:80 default_server; server_name www.example.com return 301 https://$server_name$request_uri; # SSL configuration # listen 443 ssl default_server; listen [::]:443 ssl default_server; include snippets/secure-example.conf # # Note: You should disable gzip for SSL traffic. # See: https://bugs.debian.org/773332 # ... }
# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
您需要 登录 才可以下载或查看,没有帐号?立即注册
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|51学通信技术论坛
GMT+8, 2025-1-31 15:50 , Processed in 0.065998 second(s), 32 queries .
Powered by Discuz! X3
© 2001-2013 Comsenz Inc.