[warn] 32341#0: the "ssl" directive is deprecated, use the "listen ... ssl" directive

[warn] 32341#0: the "ssl" directive is deprecated, use the "listen ... ssl" directive


 

1、问题现象

在 nginx 配置 ssl,支持https协议的过程中,nginx服务的错误日志里报了如下错误:

[warn] 32341#0: the "ssl" directive is deprecated, use the "listen ... ssl" directive

2、问题原因

新版本的 nginx 配置ssl方式发生了变化

3、解决方案

将nginx配置ssl的地方由

listen 443;
ssl on;

改为

listen 443 ssl;
# ssl on;

重启nginx服务即可,重启命令如下(本人使用的Linux操作系统是 CentOS 7.6.1810):

systemctl restart nginx
原文地址:https://www.cnblogs.com/miracle-luna/p/13427424.html