给 nginx 配置 https 时报错:
1 |
the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in "nginx.conf:44" |
问题原因
nginx 新版本修改了 ssl 的配置方式,老的 ssl on
语法已经不推荐使用,建议使用以下形式开启 ssl:
1 2 3 |
listen 443 ssl; ssl_certificate xx.crt; ssl_certificate_key xx.key; |
低版本 nginx 开启 ssl 指令:
1 2 3 |
ssl on; ssl_certificate xx.crt; ssl_certificate_key xx.key; |
评论