Installing Nagios On WHM/Cpanel Server
Posted: Mon May 02, 2011 2:19 pm
Hi Support,
I spent about 5 hours to find a solution for viewing nagios web interface since cpanel is using SuPhp bind with Apache. I’ve done the nagios installation so quickly but cpanel apache config. didn’t allow to include “conf.d” folders in “include” list. obviously this command wont work.
#make install-webconf
Everything is seems to be OK but when I open http://ip/nagios
after enter credentials this page appears.
"500 Internal Server Error
The request was not completed. The server met an unexpected condition."
In my nagios.conf
first I made the “include” file entry on main config. file.
#vi /etc/httpd/conf/httpd.conf and include the line on my domain virtual host part.
Include “/home/myuser/conf/nagios.conf”
#vi /home/myuser/conf/nagios.conf and add the following line in it.
in my nagios.conf
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
suPHP_UserGroup nagios nagios
SuexecUserGroup nagios nagios
in my httpd logs
[Mon May 02 20:50:23 2011] [error] [client 115.186.171.133] Premature end of script headers: index.php
[Mon May 02 20:50:23 2011] [error] [client 115.186.171.133] File does not exist: /usr/local/nagios/share/sys_cpanel, referer: http://x.x.x.x/nagios/
[Mon May 02 20:50:24 2011] [error] [client 115.186.171.133] SoftException in Application.cpp:422: Mismatch between target UID (99) and UID (32008) of file "/usr/local/nagios/share/index.php"
Any help will be appreciated.
I spent about 5 hours to find a solution for viewing nagios web interface since cpanel is using SuPhp bind with Apache. I’ve done the nagios installation so quickly but cpanel apache config. didn’t allow to include “conf.d” folders in “include” list. obviously this command wont work.
#make install-webconf
Everything is seems to be OK but when I open http://ip/nagios
after enter credentials this page appears.
"500 Internal Server Error
The request was not completed. The server met an unexpected condition."
In my nagios.conf
first I made the “include” file entry on main config. file.
#vi /etc/httpd/conf/httpd.conf and include the line on my domain virtual host part.
Include “/home/myuser/conf/nagios.conf”
#vi /home/myuser/conf/nagios.conf and add the following line in it.
in my nagios.conf
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
suPHP_UserGroup nagios nagios
SuexecUserGroup nagios nagios
in my httpd logs
[Mon May 02 20:50:23 2011] [error] [client 115.186.171.133] Premature end of script headers: index.php
[Mon May 02 20:50:23 2011] [error] [client 115.186.171.133] File does not exist: /usr/local/nagios/share/sys_cpanel, referer: http://x.x.x.x/nagios/
[Mon May 02 20:50:24 2011] [error] [client 115.186.171.133] SoftException in Application.cpp:422: Mismatch between target UID (99) and UID (32008) of file "/usr/local/nagios/share/index.php"
Any help will be appreciated.