问题描述
- 配置
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 ; }