I've been following the Gentoo nagios guide, but I'm having an issue with cgi files. When I click links in Nagios it tries to open the respective .cgi file, rather than running its code.
What do I need to do to make it run the code?


Code: Select all
gentoo ~ # confcat /etc/conf.d/apache2
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D PHP5 -D SUEXEC"
gentoo ~ # confcat /etc/apache2/httpd.conf
ServerRoot "/usr/lib/apache2"
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule dir_module modules/mod_dir.so
<IfDefine INFO>
LoadModule info_module modules/mod_info.so
</IfDefine>
LoadModule mime_module modules/mod_mime.so
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
<IfDefine USERDIR>
LoadModule userdir_module modules/mod_userdir.so
</IfDefine>
User apache
Group apache
Listen 80
NameVirtualHost *:80
Include /etc/apache2/modules.d/*.conf
Include /etc/apache2/vhosts.d/*.conf

Code: Select all
<VirtualHost *:80>
ServerName status.<myname>.org
ServerAlias status.<myname>.org
ServerAdmin <myemail>
DocumentRoot "/var/www/<myname>.org/nagios"
<Directory "/var/www/<myname>.org/nagios">
Options Indexes FollowSymLinks
AllowOverride All
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/usr/lib/nagios/cgi-bin">
Options Indexes FollowSymLinks
AllowOverride All
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
