[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [monit] http request always returns 400 error?
From: |
Martin Pala |
Subject: |
Re: [monit] http request always returns 400 error? |
Date: |
Sat, 15 Nov 2008 10:26:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080829 Iceape/1.1.12 (Debian-1.1.12-1) |
The HTTP server logs should help to reveal the root cause of "bad request".
Note that it's possible that it could be related to Host header ... when
the host is not set, Monit <= 5.0_beta4 set the empty Host: header which
failed in some webservers.
The next Monit beta includes this fix:
* Allow localhost as a value for the host header in the http protocol
test instead of setting an empty host header and let the http server
decide
You can set the host in the test so as workaround you can try to set the
option "host" in the port test to virtual host on your webserver:
if failed host localhost port 81 protocol http request "/phptest.php"
Joe Shang wrote:
I am using 5.0_beta4 my parameters are:
check process php-cgi with pidfile "/usr/local/php5/logs/php-fpm.pid"
start program = "/etc/init.d/phpcgi start"
stop program = "/etc/init.d/phpcgi stop"
if failed port 81 protocol http request "/phptest.php"
with timeout 10 seconds then restart
It always gets 400, but its accessible here:
address@hidden [/usr/local/apache/htdocs]# monit validate
HTTP error: Server returned status 400
'php-cgi' failed protocol test [HTTP] at INET[localhost:81] via TCP
'php-cgi' trying to restart
'php-cgi' stop: /etc/init.d/phpcgi
'php-cgi' start: /etc/init.d/phpcgi
But it is ok:
address@hidden [/usr/local/apache/htdocs]# lynx --dump localhost:81/phptest.php
PHP is healthy
address@hidden [/usr/local/apache/htdocs]#
Any ideas why it keeps doing this?
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general