Nagios web interface not available on Cpanel server
Posted: Sat Feb 14, 2015 7:57 pm
I have a new install of Nagios Core and it appears to be running, but I cannot access the web interface from my location.
The install is on my dedicated server at a hosting center running:
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
with WHM/Cpanel
Nagios is installed in:
/usr/local/nagios
The Nagios subdomain is nagios.xxx.com or xxx.com/nagios
SELinux is disabled:
[root@server ~]# sestatus
SELinux status: disabled
[root@server ~]# getenforce
Disabled
[root@server ~]#
The Vhost section of my httpd.conf is:
<VirtualHost 1.2.3.4:80>
ServerName nagios.xxx.com
ServerAlias http://www.nagios.xxx.com
DocumentRoot /sites/xxx/public_html/nagios
ServerAdmin [email protected]
UseCanonicalName On
CustomLog /usr/local/apache/domlogs/nagios.xxx.com combined
CustomLog /usr/local/apache/domlogs/nagios.sxxxyo.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User xxx# Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled xxx
<IfModule mod_suphp.c>
suPHP_UserGroup nagios nagios
</IfModule>
<IfModule concurrent_php.c>
php4_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
php5_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule !concurrent_php.c>
<IfModule mod_php4.c>
php_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
</IfModule>
</IfModule>
<IfModule !mod_disable_suexec.c>
<IfModule !mod_ruid2.c>
SuexecUserGroup nagios nagios
</IfModule>
</IfModule>
<IfModule mod_ruid2.c>
RMode config
RUidGid nagios nagios
</IfModule>
<IfModule itk.c>
# For more information on MPM ITK, please read:
# http://mpm-itk.sesse.net/
AssignUserID xxx xxx
</IfModule>
ScriptAlias /cgi-bin/ /sites/xxx/public_html/nagios/cgi-bin/
Include "/usr/local/apache/conf/userdata/std/2/xxx/nagios.xxx.com/*.conf"
</VirtualHost>
My /usr/local/apache/conf/userdata/std/2/xxx/nagios.xxx.com/*.conf file is called nagios.conf and its contents are:
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
AllowOverride AuthConfig
Order allow,deny
#Allow from 10.0.0.0/24
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
Options None
AllowOverride AuthConfig
Order allow,deny
#Allow from 10.0.0.0/24
</Directory>
I find that when I check to see if nagios is running with "service nagios status" it is not running,
When I start it, it does run. Maybe it stops when I restart httpd?
I've spent hours and hours on this and cannot find the problem.
Thanks for any assistance you can provide.
The install is on my dedicated server at a hosting center running:
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
with WHM/Cpanel
Nagios is installed in:
/usr/local/nagios
The Nagios subdomain is nagios.xxx.com or xxx.com/nagios
SELinux is disabled:
[root@server ~]# sestatus
SELinux status: disabled
[root@server ~]# getenforce
Disabled
[root@server ~]#
The Vhost section of my httpd.conf is:
<VirtualHost 1.2.3.4:80>
ServerName nagios.xxx.com
ServerAlias http://www.nagios.xxx.com
DocumentRoot /sites/xxx/public_html/nagios
ServerAdmin [email protected]
UseCanonicalName On
CustomLog /usr/local/apache/domlogs/nagios.xxx.com combined
CustomLog /usr/local/apache/domlogs/nagios.sxxxyo.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User xxx# Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled xxx
<IfModule mod_suphp.c>
suPHP_UserGroup nagios nagios
</IfModule>
<IfModule concurrent_php.c>
php4_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
php5_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule !concurrent_php.c>
<IfModule mod_php4.c>
php_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/sites/xxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
</IfModule>
</IfModule>
<IfModule !mod_disable_suexec.c>
<IfModule !mod_ruid2.c>
SuexecUserGroup nagios nagios
</IfModule>
</IfModule>
<IfModule mod_ruid2.c>
RMode config
RUidGid nagios nagios
</IfModule>
<IfModule itk.c>
# For more information on MPM ITK, please read:
# http://mpm-itk.sesse.net/
AssignUserID xxx xxx
</IfModule>
ScriptAlias /cgi-bin/ /sites/xxx/public_html/nagios/cgi-bin/
Include "/usr/local/apache/conf/userdata/std/2/xxx/nagios.xxx.com/*.conf"
</VirtualHost>
My /usr/local/apache/conf/userdata/std/2/xxx/nagios.xxx.com/*.conf file is called nagios.conf and its contents are:
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
AllowOverride AuthConfig
Order allow,deny
#Allow from 10.0.0.0/24
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
Options None
AllowOverride AuthConfig
Order allow,deny
#Allow from 10.0.0.0/24
</Directory>
I find that when I check to see if nagios is running with "service nagios status" it is not running,
When I start it, it does run. Maybe it stops when I restart httpd?
I've spent hours and hours on this and cannot find the problem.
Thanks for any assistance you can provide.