我正在尝试在 Nginx 上安装 ssl 证书(实际上是 laravel forge)。我已将证书与中间证书连接起来,并且在 Nginx 错误日志中没有收到任何错误。但是,它在移动版 chrome 中不受信任 - 仅适用于台式机。
查看 Qualys ssl 测试,据说该链不完整。我不明白如何。
这是我的 Nginx 配置
server {
listen 80;
server_name **********.com;
return 301 https://**********.com$request_uri;
}
server {
listen 443 ssl;
server_name **********.com;
root /home/forge/**********.com/public;
# FORGE SSL (DO NOT REMOVE!)
ssl on;
ssl_certificate /etc/nginx/ssl/**********.com/1086/server.pem;
ssl_certificate_key /etc/nginx/ssl/**********.com/1086/server.key;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/**********.com-error.log error;
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
Run Code Online (Sandbox Code Playgroud)
任何人都可以帮忙吗?几天来我一直在拔头发。
查看 Qualys ssl 测试,据说该链不完整。我不明白怎么...
看起来您发送了错误的中间体:
$ openssl s_client -connect cauterypens.com:443
CONNECTED(00000003)
depth=0 C = GB, OU = Domain Control Validated, CN = cauterypens.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = GB, OU = Domain Control Validated, CN = cauterypens.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 C = GB, OU = Domain Control Validated, CN = cauterypens.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
0 s:/C=GB/OU=Domain Control Validated/CN=cauterypens.com
i:/C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2
1 s:/O=AlphaSSL/CN=AlphaSSL CA - G2
i:/C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA
...
Run Code Online (Sandbox Code Playgroud)
证书0的主题是 CN=cauterypens.com. 证书 0 的颁发者是CN=AlphaSSL CA - SHA256 - G2.
中间证书应该是链中的下一个。但是,CN=AlphaSSL CA - SHA256 - G2您不是发送,而是发送CN=AlphaSSL CA - G2。注意缺少SHA256名称中。
要解决此问题,您应该AlphaSSL CA - SHA256 - G2从Download GlobalSign Root and Intermediate Certificate 获取。它有 thumprint 指纹ae:bf:32:c3:c8:32:c7:d7:bc:55:99:b1:aa:05:fb:6c:f4:d9:29:4c。
相关:CA 是CN=GlobalSign Root CA. 那就是GlobalSign Root R1下载。下载它并保存到一个文件中(它的名字是Root-R1.crt)。它已经在 PEM 编码中。然后,您应该能够使用以下方法验证链:
$ openssl s_client -connect cauterypens.com:443 -CAfile Root-R1.crt
...
Verify OK (0)
Run Code Online (Sandbox Code Playgroud)
如果它没有验证,那么你有其他的麻烦。在继续之前解决问题。
| 归档时间: |
|
| 查看次数: |
6164 次 |
| 最近记录: |