【问题标题】:nginx + SSL certificate not valid on Androidnginx + SSL 证书在 Android 上无效
【发布时间】:2017-03-21 21:38:17
【问题描述】:

我的 ssl 证书仅在 android 设备上无效,这是我的 nginx 域配置文件:

server {
    listen      80;
    server_name teatrclub.pl www.teatrclub.pl;
    return 301 https://$server_name$request_uri;
}

server {
  listen   8080;
  listen 443 ssl;

  ssl    on;
  ssl_certificate    /etc/ssl/teatrclub.crt;
  ssl_certificate_key    /etc/ssl/teatrclub.key;

  server_name teatrclub.pl www.teatrclub.pl;

  location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}

这也是我的域分析:

https://www.ssllabs.com/ssltest/analyze.html?d=teatrclub.pl

我在 nginx 配置和 ssl 方面是绿色的,所以也许有人可以给我一些提示?

【问题讨论】:

    标签: android ssl nginx


    【解决方案1】:

    您似乎没有安装所有中间证书。您可以在 ssllabs 报告的“Certification Paths”部分下的两个证书上看到“Extra Download”。

    大多数桌面浏览器会自动拥有通用的中间证书,因此它会为您处理这些,但某些移动操作系统默认情况下可能没有所有这些。

    您需要使用 https://certificatechain.io/ 之类的东西将您的证书链接在一起,然后更新您的 nginx 配置以指向新的链接证书。

    【讨论】:

    • 我花了两天时间试图了解为什么我的 Android 应用无法与我的 HTTPS 服务器一起使用。原因和你写的完全一样。非常感谢!
    猜你喜欢
    • 2018-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-05
    • 2021-09-24
    • 1970-01-01
    • 2020-06-26
    相关资源
    最近更新 更多