gpt4 book ai didi

ssl - Cloudflare SSL 证书引发安全问题

转载 作者:太空宇宙 更新时间:2023-11-03 13:44:54 25 4
gpt4 key购买 nike

我已将我的 nginx 配置为使用我从 cloudflare crypto 下载的证书和 private_key。

这是我的 nginx.conf 文件-

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;

server_name autocaptions.app *.autocaptions.app;

location / {
proxy_pass http://127.0.0.1:7887;
}
ssl on;
ssl_certificate /home/ubuntu/sslcerts/autocaptions.pem;
ssl_certificate_key /home/ubuntu/sslcerts/private-key.pem;
# ssl_client_certificate /home/ubuntu/sslcerts/cloudflare.crt;
# ssl_verify_client on;
}


# Redirect http to https
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
}

我不确定是什么问题。我已经添加了证书和 private_key。

当我尝试访问 https://autocaptions.app 时,我在浏览器中看到以下错误-

Browser Error

文本错误-

autocaptions.app has a security policy called HTTP Strict Transport Security (HSTS), which means that Firefox can only connect to it securely. You can’t add an exception to visit this site.

在 Cloudflare 配置中,我禁用了 HSTS,不确定为什么会出现此错误。

我关注了digitalocean配置 SSL 的教程。

最佳答案

您正在使用由“Cloudflare Origin CA”签署的证书。此 CA 颁发的证书旨在安装在您的源服务器上,以便 Cloudflare CDN 和您的源服务器之间的通信可以受到证书的保护。

这些类型的证书面向最终用户(即浏览器)的系统。它们仅用于保护您的原始服务器和 Cloudflare 之间的通信。典型的最终用户不会在他们的浏览器中将“Cloudflare Origin CA”作为受信任的 CA,因此他们在连接到您的源服务器时会收到 TLS 错误 - 这就是您得到的结果。但典型的最终用户不应首先连接到原始服务器——他们应该连接到 Cloudflare 实例。只有 Cloudflare 本身应该连接到源服务器,他们会承认自己的 CA 是可信的。

关于ssl - Cloudflare SSL 证书引发安全问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57579448/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com