search

Home  >  Q&A  >  body text

apache - 奇怪的现象,PHP网站访问首页一直HTTP 408 错误

奇怪现象

1)每次看Apache访问日志,总是很多408错误

网站 .htaccess 配置及顺序

  #非3www重定向在DNSPOD中已设置
  RewriteCond %{HTTP_HOST} ^myhost.cn [NC]
  RewriteRule ^(.*)$ http://www.myhost.cn/$1 [L,R=301]

  #非3www重定向在DNSPOD中已设置
  RewriteCond %{HTTP_HOST} !^(mywww|localhost|192.168.) [NC]
  RewriteCond %{HTTP_HOST} !(my.(cn|loc|test))$ [NC]
  RewriteRule ^(.*)$ http://www.myhost.cn/$1 [L,R=301]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !(xml|html|php)$
  RewriteCond %{REQUEST_URI} !\/$
  RewriteRule ^(.*)$ /$1/ [L,R=301]

Apache 访问日志

2014-12-23 15:44:46 119.130.186.24 - myhost.cn- - 80 "-" 408 0 0 "from:-"
2014-12-23 15:44:46 119.130.186.24 - myhost.cn- - 80 "-" 408 0 0 "from:-"
2014-12-23 15:44:51 119.130.186.24 - myhost.cn- - 80 "-" 408 0 0 "from:-"
2014-12-23 15:44:51 119.130.186.24 - myhost.cn- - 80 "-" 408 0 0 "from:-"
2014-12-23 15:44:51 119.130.186.24 - myhost.cn- - 80 "-" 408 0 0 "from:-"
2014-12-23 15:44:51 119.130.186.24 - myhost.cn- - 80 "-" 408 0 0 "from:-"
2014-12-23 15:44:51 119.130.186.24 - myhost.cn- - 80 "-" 408 0 0 "from:-"

奇怪的问题

不知道这些408访问是怎么产生的,没有访问来路也没有请求浏览器信息,就是408,每天都有很多,至少几十个。
PHP中文网PHP中文网2901 days ago404

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-10 15:15:05

    408 Request Timeout

    维基百科上都有说的。这个信息表明有人以较慢的速度在向你的服务器发送请求。可能是:

    1. 用户在手动输入数据
    2. 用户的网络慢死了
    3. 用户想通过这种方式进行 DoS 攻击
    4. 用户的程序出错了

    后边的「from:-」不知道是什么字段。大概是 UserAgent?

    reply
    0
  • Cancelreply