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 我认为这意味着它找不到我随后导航到证书路径的证书,而且它们都在那儿,这可能是什么问题?这是我的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; …