错误信息

更改完 nginx 配置文件后进行测试,随即输出以下内容。

# nginx -t
nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate "/path/to/your/domain.crt"
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Code language: PHP (php)

该问题是因为某些 CA 没有被所有平台识别而导致的。

解决

你可以选择以下列表中的方法,但考虑到安全问题,推荐使用方法2。

  1. 关闭 ssl_stapling
  2. 指定 nginx 信任证书链 (包含 CA 等证书)
  3. 下载 CA 证书并添加至系统信任

以下为方法2的部分配置。

ssl_certificate /path/to/your/domain.crt;
ssl_trusted_certificate /path/to/your/domain-ca-bundle;
ssl_certificate_key /path/to/your/domain.key;

重新测试后通过,问题解决。

分类: NGINX

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据