当前位置: 代码迷 >> 综合 >> nginx: [warn] the ssl directive is deprecated, use the listen ... ssl directive instead
  详细解决方案

nginx: [warn] the ssl directive is deprecated, use the listen ... ssl directive instead

热度:71   发布时间:2024-01-14 21:07:08.0

今天从另外的服务器复制了一份Nginx的配置文件,想着拿来主义,没想到重启Nginx后收到了一个警告信息

nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/gdyn.conf:53

解决方法如下:

#修改前
listen       443;...ssl on;#修改后,删除“ssl on;”这一句,然后再端口号加上 ssl即可listen       443 ssl;