I recently had trouble with nagios not showing anything when using the trends and/or the histogram.cgi. The apache error log shows a “Premature end of script headers” error.
The output was lengthy but one line shows and error "libiconv.so.2 => not found"
shows it in /usr/local/lib/libiconv.so.2
shows that /usr/local/lib is not in this config file so I added /usr/local/lib