When installed with lighttpd, CGI-backed pages give 404s with: Error: Could not open CGI config file '/etc/nagios/cgi.cfg' for reading! It seems like this has been going on since 2005 [1]. I'm not sure what the secrets are that the restrictive 0750 mode for /etc/nagios is protecting, but here are some possible solutions: a. Use 755 (or the default directory mode) for /etc/nagios, and use restrictive modes for any sensitive files instead, b. Add the webserver user to the nagios group, or c. Chown /etc/nagios to be nagios:${webserver} (as the ebuild already does for "${D}"/var/nagios/rw). [1]: http://forums.gentoo.org/viewtopic-t-407334-highlight-nagios.html Reproducible: Always Steps to Reproduce: From a fresh stage3 with Portage: 1. echo 'media-libs/gd jpeg png' >> /etc/portage/package.use 2. echo 'net-analyzer/nagios-core lighttpd' >> /etc/portage/package.use 3. echo 'net-analyzer/nagios-plugins nagios-dns nagios-ntp nagios-ssh' >> /etc/portage/package.use 4. echo 'dev-lang/php cgi' >> /etc/portage/package.use 5. emerge -v net-analyzer/nagios 8. echo 'include "mod_fastcgi.conf"' >> /etc/lighttpd/lighttpd.conf 9. echo 'include "syslog.conf"' >> /etc/lighttpd/lighttpd.conf 10. # drop the auth stuff from /etc/lighttpd/nagios.conf 11. echo 'include "nagios.conf"' >> /etc/lighttpd/lighttpd.conf 12. sed -i 's|\(#use_timezone=Australia/Brisbane\)|\1\nuse_timezone=UTC|' /etc/nagios/nagios.cfg 13. sed -i 's|\(;date.timezone.*\)|\1\ndate.timezone = "UTC"|' /etc/php/*/php.ini 14. rc-update add nagios default 15. rc-update add lighttpd default 16. rc default 17. Browse to http://localhost/nagios/cgi-bin/tac.cgi Actual Results: Error: Could not open CGI config file '/etc/nagios/cgi.cfg' for reading! Expected Results: A tactical monitoring overview.
Possibly related to [1], although #453626 also talks about .htaccess files. [1]: https://bugs.gentoo.org/show_bug.cgi?id=453626
Hello, I have implemented your option (b) in the latest nagios 4.x series. I've tested with the out-of-the-box config using both apache and lighttpd, and they should both start right up. If the issue isn't fixed for you, please feel free to reopen this.
Sorry, option *c*.