大网数据广告活动
服务器运维问答

Searx (based on Nginx) "Let's Encrypt" SSL certificate is not valid for Safari (iPhone and MacOS), it is valid for the rest of the world

· 52CE 我爱测

I have a customized installation of Searx ( https://searx.me/ ) at: https://ricercaalternativa.mydissent.net/ It has been working properly with Letsencrypt for years now. As of a few days ago, however, the certificate provided by…

问题原文

原帖链接 · Francesco Galgani · CC BY-SA 4.0

I have a customized installation of Searx (https://searx.me/) at: https://ricercaalternativa.mydissent.net/

It has been working properly with Letsencrypt for years now. As of a few days ago, however, the certificate provided by Letsencrypt is compatible with everything except Apple (Safari on iPhone and on macOS).

This test shows a "chain issue": https://www.ssllabs.com/ssltest/analyze.html?d=ricercaalternativa.mydissent.net

I don't know how to solve the problem (and actually what is the meaning of this issue), also because the SSL certificate installation has always been fully automated with the following Bash script:

#!/bin/bash
YOUR_DOMAIN="ricercaalternativa.mydissent.net"
certbot certonly -d ${YOUR_DOMAIN} --manual --preferred-challenges dns
service uwsgi restart
service nginx restart

Anyway, --preferred-challenges dns seems ignored: it doesn't ask me to deploy a DNS record. This is the output:

# ./updateSSL.sh 
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Cert not yet due for renewal

You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
(ref: /etc/letsencrypt/renewal/ricercaalternativa.mydissent.net.conf)

What would you like to do?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Keep the existing certificate for now
2: Renew & replace the cert (limit ~5 per 7 days)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Renewing an existing certificate

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/ricercaalternativa.mydissent.net/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/ricercaalternativa.mydissent.net/privkey.pem
   Your cert will expire on 2022-01-05. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

This is the version of certbot:

# apt-cache policy certbot | grep Installed
  Installed: 0.31.0-2~deb10u1+ubuntu18.04.1+certbot+3

已采纳解答

原帖链接 · Ryan Bolger · CC BY-SA 4.0

Your problem stems from the fact that your web server is not sending any chain certificates with your leaf certificate. This is what the SSL Labs test is trying to tell you when it says, "This server's certificate chain is incomplete".

Browsers and other clients have to guess how to verify the certificate you're sending and some are more capable/lenient than others at doing this. Safari is not. This only started happening recently due to a recent Root CA certificate expiration.

In your nginx config, you likely have a line such as:

ssl_certificate  /etc/letsencrypt/live/ricercaalternativa.mydissent.net/cert.pem;

If so, change cert.pem to fullchain.pem and restart nginx. Then re-check via SSL Labs and see what it says about your chain.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-10-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。