Tags

, , ,


I wanted to montior my apache instance with Monit . Its so simple…

I just had to add the apache related configuration in monitrc file and start monit.

Looked like it worked…BUT…

 

When I looked at example.com:2812. It shows me something like ” ‘apache’ process is not running.” I realized that as My server has purchased SSL certificate and for this we have given a passphrase. So When ever apache starts, it asks for the pass phrase for verification. When monit tries to run the apache it also sends the dialog box of asking the passphrase which monit is unable to give. Hence I can not monitor Apache with pass phrase enabled SSL via monit. 

Now when I sit to resolve this issue. I have an easy option : Repurchase the ssl with passphrase as nil. But that is costly and is not safe at all. So I looked for some other solution. And I found one in name of  ‘SSLPassPhraseDialog‘.

One just has to add one line in their apache2.conf file :

 
SSLPassPhraseDialog exec:/content/ssl/pp/pp.out

This file should contain something like:

#!/bin/sh
echo 'mypassphrase'

 

and make this file executable by:

chmod +x passphrase_file
Done…Simple na. Now you can just restart your apache and check that its not asking for a passphrase now 🙂

Advertisements