Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

Nginx older than 0.6.15 used to return 400 to requests like GET HTTP/1.0. I assume, you have updated Nginx in the last two years? If yes, please try to raise Nginx debugging level and post logs here.

share|improve this answer
Running nginx-0.8.35 – Miko Apr 14 '10 at 19:50
up vote 0 down vote accepted

The issue turned out be the cause of version discrepancy.

My original monitrc file was intended for v5+, but the box it was running on used Monit 4.1

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.