如何修复此 SSL 警告 服务器证书不包含与服务器名称匹配的 ID
[ssl:warn] [pid 4122] AH01707: ip-xxx-xx-x-x.abcd.compute.internal:443:0 server certificate does NOT include an ID which matches the server name
您好,
我不知道是什么产生了这个警告以及如何修复它。
网站在 AWS 服务器上运行。
[ssl:warn] [pid 4122] AH01707: ip-xxx-xx-x-x.abcd.compute.internal:443:0 server certificate does NOT include an ID which matches the server name
Hello,
I can't figure out what generates this warning and how to fix it.
Website is running on AWS servers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
发生这种情况的原因是证书上的服务器名称与 Web 服务器配置中定义的服务器名称不匹配。要解决此问题,您可以在 Web 服务器配置中将服务器名称更改为 localhost。
服务器名称 abc.com ----> ServerName localhost
参考:https://kinsta.com/knowledgebase/xampp-server-certificate-does-not-include-an-id-which-matches-the-server-name/
This happen due to server name on certificate does not matches with the server name defined in the webserver configuration. To resolve this you can change the server name to localhost in your webserver configuration.
ServerName abc.com ----> ServerName localhost
Ref: https://kinsta.com/knowledgebase/xampp-server-certificate-does-not-include-an-id-which-matches-the-server-name/
这可能是由于 .htaccess 文件造成的。
需要注意的是,注释不应放置在 htaccess 文件中的一行中间,它们应始终从新行开始。
This might be due to the .htaccess file.
It's important to note that comments should not be placed in the middle of a line in the htaccess file, they should always be start from the new line.
就我而言,这是 www 与否之间的区别。在
/etc/apache2/sites-enabled/.conf
中,尝试将 www 作为主 URL:In my case, it was a difference between www or not. In
/etc/apache2/sites-enabled/<name>.conf
, try making www the main URL: