![我的网站可以 ping 通,但通过浏览器访问时状态始终为“等待”](https://linux22.com/image/681297/%E6%88%91%E7%9A%84%E7%BD%91%E7%AB%99%E5%8F%AF%E4%BB%A5%20ping%20%E9%80%9A%EF%BC%8C%E4%BD%86%E9%80%9A%E8%BF%87%E6%B5%8F%E8%A7%88%E5%99%A8%E8%AE%BF%E9%97%AE%E6%97%B6%E7%8A%B6%E6%80%81%E5%A7%8B%E7%BB%88%E4%B8%BA%E2%80%9C%E7%AD%89%E5%BE%85%E2%80%9D.png)
当我尝试使用 CMD.exe 然后输入:
ping fgroupindonesia.com
它返回一个真实的响应,例如:
C:\Users\admin>ping fgroupindonesia.com
Pinging fgroupindonesia.com [219.83.68.83] with 32 bytes of data:
Reply from 219.83.68.83: bytes=32 time=24ms TTL=55
Reply from 219.83.68.83: bytes=32 time=25ms TTL=55
Reply from 219.83.68.83: bytes=32 time=25ms TTL=55
Reply from 219.83.68.83: bytes=32 time=24ms TTL=55
Ping statistics for 219.83.68.83:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 24ms, Maximum = 25ms, Average = 24ms
看起来还行,但为什么不能通过浏览器打开?有什么线索吗?
当我尝试使用端口 80 的 telnet:
telnet www.fgroupindonesia.com 80
GET / HTTP/1.1
它给了我这个输出:
HTTP/1.1 400 Bad Request
Date: Thu, 21 Apr 2016 07:53:37 GMT
Server: Apache
Accept-Ranges: bytes
Connection: close
Content-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>400 Bad Reques
t</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
<style type="text/css">
body {
font-family: Verdana, Ar
ial, Helvetica, sans-serif;
font-size: 12px;
backgrou
nd-color:#367E8E;
scrollbar-base-color: #005B70;
scrollba
r-arrow-color: #F3960B;
scrollbar-DarkShadow-Color: #000000;
color: #FFFFFF;
margin:0;
}
a { color:#021f25; tex
t-decoration:none}
h1 {
font-size: 18px;
color: #
FB9802;
padding-bottom: 10px;
background-image: url(sys_cpanel
/images/bottombody.jpg);
background-repeat: repeat-x;
padding:5px 0 10px 15px;
margin:0;
}
#body-
content p {
padding-left: 25px;
padding-right: 25px;
line-height: 18px;
padding-top: 5px;
padding-
bottom: 5px;
}
h2 {
font-size: 14px;
font-weight: bold;
color: #FF9900;
padding-left: 15px;
}
</style>
</head>
<body>
<div id="body-content">
<!-- start content
-->
<!--
instead of REQUEST_URI, we could show absolute URL via:
http://HTTP_HOS
T/REQUEST_URI
but what if its https:// or other protocol?
SERVER_PORT_
SECURE doesn't seem to be used
SERVER_PORT logic would break if they use alte
rnate ports
-->
<h1>400 Bad Request</h1>
<p>Your browser sent a request that this s
erver could not understand:</p>
<blockquote>
(none)/ (port 80)
</blockquote
>
<p>
Please forward this error screen to 219.83.68.83's
<a href="mailto:
[email protected]?subject=Error message [400] 400 Bad Request for (none)/ port
80 on Thursday, 21-Apr-2016 14:53:37 WIB">
WebMaster</a>.
</p>
<hr />
<!-- end c
ontent -->
</div>
</body>
</html>
Connection to host lost.
C:\Users\admin>
答案1
您看到的症状可能有很多原因。但最常见的原因是 PMTU 发现问题。
解决 PMTU 发现问题最简单的方法是减少客户端或服务器上使用的 MTU。如果有多个网络接口,则只需减少用于在客户端和服务器之间发送数据包的网络接口上的 MTU。
在进行任何更改之前,请记下当前配置的 MTU。然后尝试将其减少到 1280。如果此方法有效,则问题很可能是由于 PMTU 发现问题造成的。
如果将 MTU 更改为 1280 没有帮助,您将必须检查流量的数据包捕获以识别问题。
400 Bad Request
您在手动发送请求时遇到的错误是telnet
由于您输入了格式错误的 HTTP 请求。在 HTTP/1.1 中,必须包含标Host
头。
你可以尝试这个:
telnet www.fgroupindonesia.com 80
GET / HTTP/1.1
Host: www.fgroupindonesia.com