问题描述
- 配置
Nginx抛出如下提示信息:
[warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/nginx.conf:22
2021-01-21T03:02:01.837187000Z nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/nginx.conf:22
原因
- 由于新版
nginx采用新的方式进行监听https请求,需要修改配置
解决
- 删除
ssl on,修改listen 443 ssl
# 解决前(删除)
server { listen 443 ; ssl on; }
# 解决后(保留)
server { listen 443 ssl ; }
本文指导如何修正Nginx配置,解决因新版弃用ssl指令而出现的警告,通过修改listen 443 ssl来兼容HTTPS请求。
4万+

被折叠的 条评论
为什么被折叠?



