|
From: | A S |
Subject: | [monit] monit & nginx |
Date: | Mon, 20 Apr 2009 20:09:28 -0700 (PDT) |
I'm having trouble getting monit to work properly with nginx (an alternative web server to Apache). Whenever I start monit, it e-mails me the following error and restarts nginx even though nginx is running and is accepting connections: Subject [of e-mail]: Connection failed nginx Description: 'nginx' failed protocol test [HTTP] at INET[123.45.67.89:80] via TCP The relevant stanza in my monit.conf file is: check process nginx with pidfile /var/run/nginx.pid start program = "/etc/init.d/nginx start" stop program = "/etc/init.d/nginx stop" if failed host 123.45.67.89 port 80 protocol HTTP request /monit/token then restart if 5 restarts within 5 cycles then timeout I have tried the "if failed" line every which way (with and without "and" between the HTTP and request, with and without quotation marks around the path, with a different path altogether, etc.), but no luck. And FYI, I can load the exact same URL from the server command line with: wget http://123.45.67.89:80/monit/token I have seen a number of similar reports from other users. Any ideas re what's wrong here? Has anyone gotten monit to work with nginx? Many thanks, Andrew |
[Prev in Thread] | Current Thread | [Next in Thread] |