我正在尝试在我的网站上设置 HTTPS/SSL test.example.com
。
我编辑了我的文件,/etc/nginx/sites-enabled/my_site
以便server {}
块的顶部是这个。
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/cert_chain.crt;
ssl_certificate_key /etc/ssl/example.key;
server_name test.example.com;
error_log /var/log/nginx/debug.log debug;
... Rest of code ...
}
Run Code Online (Sandbox Code Playgroud)
我跑了nginx restart
。但是如果我https://test.testexample.com
在 Chromium 中访问,我的浏览器会警告我与该站点的连接不安全。
铬错误:
Your connection is not private
Attackers might be trying to steal your information from test.example.com (for example, passwords, messages, or credit cards). Learn more
NET::ERR_CERT_COMMON_NAME_INVALID
This server could not prove that it is test.example.com; its security certificate is from example.com. This may be caused by a misconfiguration or an attacker intercepting your connection.
Run Code Online (Sandbox Code Playgroud)
我的证书是由 Comodo 颁发的。我正在按照 Namecheap 的指南将 SSL 集成到我的网站中。第三步:https : //www.namecheap.com/support/knowledgebase/article.aspx/9419/0/nginx
NET::ERR_CERT_COMMON_NAME_INVALID ...
该服务器无法证明它是 test.example.com;它的安全证书来自example.com。这可能是由于配置错误或攻击者拦截了您的连接造成的。
服务器返回的证书与 URL 中的名称不匹配。根据此描述,您已为其订购了证书,example.com
但尝试访问该站点,因为test.example.com
该站点不是颁发证书的域。
此问题可能是由于对 URL 中的域与证书的比较如何工作的错误理解。一般来说:
example.com
不匹配test.example.com
。*
,它必须是最左边的标签,并且它只匹配域的一个部分,即证书 for *.example.com
will 匹配www.example.com
而test.example.com
但不匹配www.test.example.com
。 归档时间: |
|
查看次数: |
9150 次 |
最近记录: |