使用免费证书(Let’s Encrypt)
  1. 安装 Certbot:

    sudo yum install certbot python3-certbot-nginx -y

  2. 获取并自动配置证书:

    sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

  3. 设置自动续期:

    sudo crontab -e

    添加以下内容:

    0 3 * * * /usr/bin/certbot renew --quiet

现在,域名解析到 Nginx 配置就完成了,并且支持 HTTPS!

更多推荐