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

19 篇文章 0 订阅

前言

  • CentOS Linux release 8.2.2004 (Core)
  • phpstdy X1.26
  • nginx1.15

错误内容

nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in /usr/local/phpstudy/vhost/nginx/1xxx.com_80.conf:6

分析

http://nginx.org/en/docs/mail/ngx_mail_ssl_module.html#ssl

This directive was made obsolete in version 1.15.0. The ssl parameter of the listen directive should be used instead.

解决办法

  1. 删除 ssl on; 指令
  2. listen 指令中添加 ssl 参数
server{
	listen 80 ;
	listen 443 default ssl;
	server_name xxx.com ;

	ssl_certificate /usr/local/phpstudy/vhost/nginx/ssl/20210709_xxx.com.pem;
	ssl_certificate_key /usr/local/phpstudy/vhost/nginx/ssl/20210709_xxx.com.key;

	...
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值