给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; |
评论