我从InstantSSL订购了一个ssl证书,并获得了以下一对文件:
my_ip.ca-bundle,my_ip.crt
我以前也使用openssl生成了我自己的密钥和crt文件。
我连接了所有的crt文件:
cat my_previously_generted.crt my_ip.ca_bundle my_ip.crt> chained.crt
并configurationnginx如下:
server { ... listen 443; ssl on; ssl_certificate /home/dmsf/csr/chained.crt; ssl_certificate_key /home/dmsf/csr/csr.nopass.key; ... }
我没有根据客户请求的域名。 当我用https://my_ip打开浏览器时
铬给我这个错误:
The site's security certificate is not trusted! You attempted to reach my_ip, but the server presented a certificate issued by an entity that is not trusted by your computer's operating system. This may mean that the server has generated its own security credentials, which Google Chrome cannot rely on for identity information, or an attacker may be trying to intercept your communications. You should not proceed, especially if you have never seen this warning before for this site.
有没有办法使一个SSL证书只有一个IP地址工作? 或者我不得不获得一个域名,以获得一个适当的https连接到我的网站?
首先,当您在Chrome中打开网站并查看证书属性时,它是否是正确的证书? 如果不是的话,修复你的nginx,这样它就可以提供正确的证书。 我真的无法帮到那里。
假设这是正确的,IP地址需要在证书中定义,以便浏览器信任它。 具体而言,可以将其设置为通用名称(CN)或主题备用名称中的DNS值。 请注意,您可以在主题备用名称中使用IP地址值,但Chrome不会使用它。 如果它在DNS条目中,它只会信任IP值。
我连接了所有的crt文件
这听起来不对。 您只需要连接由CA提供给您的签名证书和必要的中间证书。
你自己的,自己生成的证书(不pipe它是什么)都像拇指那里突出一样。