1

我有一个通过 https 连接没有问题的站点(apache centos),但是当我尝试调用定义为 443 端口的页面时,即 example.com:443 我收到 400 错误。

我查看了 httpd.conf 并且听 443 未注释。

有任何想法吗?

提前致谢

4

1 回答 1

3

The way http://www.example.com is the same as going for http://www.example.com:80

You will see that https://www.example.com equals https://www.example.com:443

What is probably happening to you is you are trying:

http://www.example.com:443 (that is, plain HTTP protocol, but over the 443 port).

Why is this a problem?

The web server expects SSL-encrypted data on the 443 port.

When you use http://www.example.com:443, you're telling your browser to speak plain HTTP to 443, an usually SSL-enabled server port.

The result is unpredictable. It ultimately depends on the server.

Most servers will either (1) kill the connection right off the bat or (2) just give back a HTTP 400 Bad request response, trying to let you know you did something wrong (the 4xx group of errors indicates client errors).

于 2013-05-07T00:44:07.243 回答