First in /etc/nagios3/nagios.cfg change
check_external_commands=1
Then you will get errors about
Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'!
If you
rm /var/lib/nagios3/rw/nagios.cmd chmod a+x /var/lib/nagios3 chmod g+s /var/lib/nagios3/rw /etc/init.d/nagios restart
That error should go away and www-data should have read access to that file. You may need to
chgrp www-data /var/lib/nagios3/rwBut that was already there for me.