nginx: [warn] the "ssl" directive is deprecated的解决方法

问题描述

升级nginx版本之后,使用之前的配置文件,启动nginx时,出现如下信息:

nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /usr/local/nginx/conf/nginx.conf

问题分析

这是一个warn警告,nginx也能正常使用,但是由于强迫症,还是要把warn解决掉。

根据翻译,nginx提示ssl这个指令已经不建议使用,要使用listen ... ssl替代。网上查找nginx更新日志里面,也有提到:

Change: the “ssl” directive is deprecated; the “ssl” parameter of the “listen” directive should be used instead.

ssl不建议作为一个指令使用,而是应该listen指令的一个参数。

解决方法

如果使用listen 443 ssl,删除ssl on就行了。

猜你喜欢

转载自blog.csdn.net/Mr_OOO/article/details/81607186