设置 SSL 后与站点的连接仍然不完全安全
Connection to the site is still not fully secure after setting SSL
我已经设置 www.myapp.io
连接到由 nginx 托管的 MEAN-stack 应用程序。我刚刚向它添加了 SSL(通过 let's encrypt
),并在 Cloudflare
中设置了 Full
。现在,https://www.myapp.io
工作并且 http://www.myapp.io
被重定向到 https://www.myapp.io
.
但是Chrome地址栏的小感叹号显示Your connection to this site is not fully secure
.
有谁知道问题出在哪里?
请注意,当我在 MAC 中使用 localhost
开发这个 MEAN-stack 应用程序时,我需要调用 https://localhost:3000
,为了实现这一点,我遵循了 ,包括在 www
中添加以下块:
var fs = require("fs");
var config = {
key: fs.readFileSync('key.pem'),
cert: fs.readFileSync('cert.pem')
};
var server = https.createServer(config, app).listen(3000);
所以我不知道是否需要(以及如何)更改它。
鉴于我的 current server block of nginx 已经有 .pem
信息,如果我写 var server = https.createServer(app).listen(3000)
,npm start
有效,而 https://www.myapp.io
认为服务器离线.
有人能帮忙吗?
编辑 1: 我刚刚意识到不同的页面可能具有不同的安全信息,即使对于同一个域也是如此。例如,
https://www.myapp.io/#/new
显示 secure
:
而 https://www.myapp.io/#/home
显示 not fully secure
:
调试 Cloudflare 将域名指向 dev Mac 作为具有 HSTS、ssl 装订验证的服务器是没有意义的。与 cookie 相关的问题可能存在混合内容。围绕 CA 和 localhost 确实有很多事情。
您可以使用 Hurricane electric 免费 DNS 作为普通 DNS and/or 免费层级的任何 PaaS,例如 IBM Bluemix MEAN stack 来交叉检查您的开发设置。
如果你想要本地主机,你应该有 easy Nginx config like written in this guide or this guide。在你的配置中注释掉这些并尝试:
# ssl_prefer_server_ciphers on;
# ssl_stapling on;
# ssl_stapling_verify on;
# add_header Strict-Transport-Security max-age=15768000;
# ssl_session_timeout 1d;
装订是一件复杂的事情,即使使用完全正确的完整配置将其保持打开状态也会像我解释的那样带来 OSCP 装订错误 -- OSCP Stapling Error. Except real server, more strict will be the security, more will be difficulty to find a basic error. Not fully secure is explained here。
我知道我的回答可能无法轻松解决您的问题。但是变数太多了。我建议要么忽略本地主机上的错误,要么为开发人员使用免费的 PaaS。
我已经设置 www.myapp.io
连接到由 nginx 托管的 MEAN-stack 应用程序。我刚刚向它添加了 SSL(通过 let's encrypt
),并在 Cloudflare
中设置了 Full
。现在,https://www.myapp.io
工作并且 http://www.myapp.io
被重定向到 https://www.myapp.io
.
但是Chrome地址栏的小感叹号显示Your connection to this site is not fully secure
.
有谁知道问题出在哪里?
请注意,当我在 MAC 中使用 localhost
开发这个 MEAN-stack 应用程序时,我需要调用 https://localhost:3000
,为了实现这一点,我遵循了 www
中添加以下块:
var fs = require("fs");
var config = {
key: fs.readFileSync('key.pem'),
cert: fs.readFileSync('cert.pem')
};
var server = https.createServer(config, app).listen(3000);
所以我不知道是否需要(以及如何)更改它。
鉴于我的 current server block of nginx 已经有 .pem
信息,如果我写 var server = https.createServer(app).listen(3000)
,npm start
有效,而 https://www.myapp.io
认为服务器离线.
有人能帮忙吗?
编辑 1: 我刚刚意识到不同的页面可能具有不同的安全信息,即使对于同一个域也是如此。例如,
https://www.myapp.io/#/new
显示 secure
:
而 https://www.myapp.io/#/home
显示 not fully secure
:
调试 Cloudflare 将域名指向 dev Mac 作为具有 HSTS、ssl 装订验证的服务器是没有意义的。与 cookie 相关的问题可能存在混合内容。围绕 CA 和 localhost 确实有很多事情。
您可以使用 Hurricane electric 免费 DNS 作为普通 DNS and/or 免费层级的任何 PaaS,例如 IBM Bluemix MEAN stack 来交叉检查您的开发设置。
如果你想要本地主机,你应该有 easy Nginx config like written in this guide or this guide。在你的配置中注释掉这些并尝试:
# ssl_prefer_server_ciphers on;
# ssl_stapling on;
# ssl_stapling_verify on;
# add_header Strict-Transport-Security max-age=15768000;
# ssl_session_timeout 1d;
装订是一件复杂的事情,即使使用完全正确的完整配置将其保持打开状态也会像我解释的那样带来 OSCP 装订错误 -- OSCP Stapling Error. Except real server, more strict will be the security, more will be difficulty to find a basic error. Not fully secure is explained here。
我知道我的回答可能无法轻松解决您的问题。但是变数太多了。我建议要么忽略本地主机上的错误,要么为开发人员使用免费的 PaaS。