nginx在ssl站点中报nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in错误


环境情况及具体表现:CentOS7 x86_64,nginx 1.15.0,启动nginx时有下列提示,但测试也可通过,服务能正常启动,也能访问。


[root@iz2ze6jjhwn5m83ygo2yo6z vhost]# /usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf

nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in /usr/local/nginx/conf/vhost/web.conf:4

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok

nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

据查资料,这是nginx在1.15.0之后,ssl站点无需再写ssl on参数,将此参数注释后即可,该问题初次遇到,正在观察是否有其它问题。

 

本文链接地址: https://danteng.org/nginx-ssl-nginx-warn-the-ssl-directive-is-deprecated-use-the-listen-ssl-directive-instead-in/