httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josu Lazkano <josu.lazk...@barcelonamedia.org>
Subject [users@httpd] Monit on vhost
Date Thu, 21 Jul 2011 15:28:43 GMT
Hello list, I am trying to configure a server with lots of vhost.

I need to check if they are online with Monit, for this, I just create this on each vhost:

        Alias /monit/ /var/www/monit/
        <Directory "/var/www/monit/">
                Options Indexes MultiViews FollowSymLinks
                AllowOverride None
                Order deny,allow
                Deny from all
                Allow from all
        </Directory>

So, I just add on the Monit lines like this:

   #domain1
   if failed host domain1.com port 80 protocol http and request "/monit/token" then alert
   if failed host www.domain1s.com port 80 protocol http and request "/monit/token" then alert

   #domain2
   if failed host domain2.com port 80 protocol http and request "/monit/token" then alert
   if failed host www.domain2.com port 80 protocol http and request "/monit/token" then alert

There is a "token" file on /var/www/monit/ so, if Monit can not get this file it send an alert.

The Monit service is on localhost, so I just want to get access to this directory just localhost.

How could I do that?

Thanks for all your help and best regards.

Mime
View raw message