httpd 400 Bad Request

0. web请求服务返回400

服务器日志

/var/log/httpd/error_log

[Thu Aug 01 15:22:48.690943 2019] [suexec:notice] [pid 7181] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Thu Aug 01 15:22:48.703911 2019] [lbmethod_heartbeat:notice] [pid 7181] AH02282: No slotmem from mod_heartmonitor

/var/log/httpd/access_log

14.17.22.32 - - [01/Aug/2019:15:32:25 +0800] "GET / HTTP/1.1" 400 347 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
14.17.22.32 - - [01/Aug/2019:15:32:25 +0800] "GET /favicon.ico HTTP/1.1" 400 347 "http://aicamera_tiyan.weigarden.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
14.17.22.32 - - [01/Aug/2019:15:32:29 +0800] "GET /favicon.ico HTTP/1.1" 400 347 "http://aicamera_tiyan.weigarden.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
14.17.22.32 - - [01/Aug/2019:15:32:30 +0800] "GET / HTTP/1.1" 400 347 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"

1. 解决方案

  1. /etc/httpd/conf/httpd.conf配置ServerName
  2. 域名要可用并且不能包含下划线
ServerName www.example.com:80
#ServerName www.example_test.com:80 //会报400

你可能感兴趣的:(bug集)