zoukankan      html  css  js  c++  java
  • nginx报错 the "ssl" directive is deprecated, use the "listen ... ssl"

    nginx报错 the "ssl" directive is deprecated, use the "listen ... ssl"
    原创fengqiaoguke 最后发布于2019-08-22 12:50:40 阅读数 889 收藏
    展开
    今天更新了nginx然后重启docker发现报错了:the "ssl" directive is deprecated, use the "listen ... ssl"

    下面是详细的日志

    Attaching to docker_go-nginx_1
    go-nginx_1 | 2019/08/22 03:21:30 [warn] 6#6: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/site.conf:18
    go-nginx_1 | nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/site.conf:18
    go-nginx_1 | 2019/08/22 03:21:34 [emerg] 20#20: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | 2019/08/22 03:21:34.319092 [ERR] (cli) 1 error occurred:
    go-nginx_1 | * failed to execute command "nginx -s reload" from "./nginx.tpl" => "/etc/nginx/conf.d/site.conf": child: command exited with a non-zero exit status:
    go-nginx_1 |
    go-nginx_1 | nginx -s reload
    go-nginx_1 |
    go-nginx_1 | This is assumed to be a failure. Please ensure the command
    go-nginx_1 | exits with a zero exit status.
    go-nginx_1 |
    go-nginx_1 | 2019/08/22 03:21:37 [emerg] 6#6: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | 2019/08/22 03:21:39 [emerg] 8#8: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | 2019/08/22 03:21:42 [emerg] 6#6: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | 2019/08/22 03:21:45 [emerg] 6#6: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | 2019/08/22 03:21:47 [emerg] 6#6: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | 2019/08/22 03:21:51 [emerg] 6#6: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | 2019/08/22 03:21:59 [emerg] 6#6: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | 2019/08/22 03:22:13 [emerg] 6#6: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | 2019/08/22 03:22:39 [emerg] 7#7: invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    go-nginx_1 | nginx: [emerg] invalid parameter "on" in /etc/nginx/conf.d/site.conf:15
    nginx1.15.0更新日志
    Changes with nginx 1.15.0 05 Jun 2018
    *) Change: the "ssl" directive is deprecated; the "ssl" parameter of the
    "listen" directive should be used instead.
    ssl不建议作为一个指令使用,而只是listen指令的一个参数。

    解决办法

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

    改成

    server {
    listen 443 ssl;
     
    ————————————————
    版权声明:本文为CSDN博主「fengqiaoguke」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/fengqiaoguke/article/details/100011255

  • 相关阅读:
    mySql存储emoji表情报错(mysql incorrect string value)
    git初始化本地项目并推送到git服务器
    linux安装kafka
    解决:ngxin做http强制跳转https,接口的POST请求变成GET
    idea生成类注释和方法注释的正确方法
    Netty学习笔记
    Centos7下安装运行keepalived
    logback.xml配置文件详解
    IDEA快捷键笔记
    word,excel,ppt,txt转换为 PDF
  • 原文地址:https://www.cnblogs.com/deepalley/p/12354206.html
Copyright © 2011-2022 走看看