如何修复此 SSL 警告 服务器证书不包含与服务器名称匹配的 ID

发布于 2025-01-11 11:03:39 字数 233 浏览 0 评论 0原文

[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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

止于盛夏 2025-01-18 11:03:39

发生这种情况的原因是证书上的服务器名称与 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/

唐婉 2025-01-18 11:03:39

这可能是由于 .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.

橪书 2025-01-18 11:03:39

就我而言,这是 www 与否之间的区别。在 /etc/apache2/sites-enabled/.conf 中,尝试将 www 作为主 URL:

<VirtualHost *:80>
        ServerName www.example.com
        ServerAlias example.com
        Redirect permanent / https://www.example.com/
RewriteEngine on
RewriteCond %{SERVER_NAME} =example.com [OR]
RewriteCond %{SERVER_NAME} =www.example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
        DocumentRoot /<path>
        ServerName www.example.com
        ServerAlias example.com
    <Directory /<path>
    </Directory>
SSLEngine on
Include /<path>/ssl.conf
SSLCertificateFile /<path>/fullchain.pem
SSLCertificateKeyFile /<path>/privkey.pem
</VirtualHost>
                     

In my case, it was a difference between www or not. In /etc/apache2/sites-enabled/<name>.conf, try making www the main URL:

<VirtualHost *:80>
        ServerName www.example.com
        ServerAlias example.com
        Redirect permanent / https://www.example.com/
RewriteEngine on
RewriteCond %{SERVER_NAME} =example.com [OR]
RewriteCond %{SERVER_NAME} =www.example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
        DocumentRoot /<path>
        ServerName www.example.com
        ServerAlias example.com
    <Directory /<path>
    </Directory>
SSLEngine on
Include /<path>/ssl.conf
SSLCertificateFile /<path>/fullchain.pem
SSLCertificateKeyFile /<path>/privkey.pem
</VirtualHost>
                     
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文