小编Rém*_*émi的帖子

SSL & Ngnix:在 SSL 握手时监听 SSL 端口的服务器中没有定义“ssl_certificate”

我已经成功地使用 LE 创建了我的证书,没有错误,我还设法将我的流量从端口 80 重定向到端口 443。但是当我重新加载我的 nginx 服务器时,我无法访问我的网站。Ngnix 错误日志显示这一行:

4 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 192.168.0.104, server: 0.0.0.0:443
Run Code Online (Sandbox Code Playgroud)

我认为这意味着它找不到我然后导航到证书路径的证书,它们都在那里,可能是什么问题?这是我的 Ngnix 配置的样子:

server {
       listen         80;
       server_name    pumaportal.com www.pumaportal.com;
       return         301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;

    server_name pumaportal.com www.pumaportal.com;

    add_header Strict-Transport-Security "max-age=31536000";

    ssl_certificate /etc/letsencrypt/live/pumaportal.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/pumaportal.com/privkey.pem;

    ssl_stapling on;
    ssl_stapling_verify on;

    access_log /var/log/nginx/sub.log combined;

    location /.well-known {
       alias /[MY PATH]/.well-known;
    }

    location / {
        proxy_pass http://localhost:2000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade; …
Run Code Online (Sandbox Code Playgroud)

ssl nginx lets-encrypt

31
推荐指数
3
解决办法
6万
查看次数

标签 统计

lets-encrypt ×1

nginx ×1

ssl ×1