配置web服务器https的时候访问出现400(apachenginx)

    技术2026-04-17  2

    配置web服务器https的时候访问出现400(apache/nginx)

    今天在配置web服务器的时候使用本机浏览器访问出现400的错误 APACHE NGINX 解决方法其实很简单 访问的时候前面加个https

    如下所示 https://IP:443

    这样就显示正常了 其实就是自己的一点失误 但是网上各种写的乱七八糟都不是我想要的结果 国人并不靠谱 最后看到serverfault这段评论才发现问题所在

    Your URL of http://example.com:443 is causing the browser to make a plain HTTP request to port 443. But the server is expecting TLS there which means that your plain HTTP request is unexpected. Apache is at least nice enough to check if the incoming data for a plain HTTP request in this case so that it can offer you a more useful description:

    Reason: You’re speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please.

    If you try such requests with other servers then they would either close the connection without any error at all or just hang because they are still hoping to get a TLS handshake from the client.

    Processed: 0.015, SQL: 9