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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix