nginx won't respond to monit

Posted by Miko on Server Fault See other posts from Server Fault or by Miko
Published on 2010-04-13T09:27:47Z Indexed on 2010/04/13 9:33 UTC
Read the original article Hit count: 438

Filed under:
|

Although EngineX is running, monit can't seem to figure it out.

Here's my monit log:

[PDT Apr 13 02:19:19] error    : HTTP error: Server returned status 400
[PDT Apr 13 02:19:19] error    : 'nginx' failed protocol test [HTTP] at INET[localhost:80] via TCP
[PDT Apr 13 02:19:19] info     : 'nginx' trying to restart
[PDT Apr 13 02:19:19] info     : 'nginx' stop: /etc/init.d/nginx
[PDT Apr 13 02:19:20] info     : 'nginx' start: /etc/init.d/nginx

The monitrc file contains the following configuration:

if failed port 80 protocol http and request '/ping.txt' # check for response
     with timeout 20 seconds
     then restart

I can access the file through lynx http://localhost:80/ping.txt without any problems.

Why would monit have trouble requesting the file when nginx is running just fine?

© Server Fault or respective owner

Related posts about monit

Related posts about nginx