Run Apache as the Nagios user to avoid all the annoyance around external command socket permissions.