Nagios apache web configuration
Posted: Tue Feb 24, 2015 7:50 pm
Today I installed nagios core version 4.0.8 on a RHEL 6 machine. I followed the installation instructions at http://nagios.sourceforge.net/docs/nagi ... edora.html. However, when I try to access the website at http://localhost/nagios, I get the following error message:
You don't have permission to access /nagios/ on this server.
I investigated the issue and the file /etc/httpd/conf.d/nagios.conf contains:
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.
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>
If I change the Options line under the directory entry "/usr/local/nagios/share" to:
Options All
and run "service httpd restart", then I can access the website at http://localhost/nagios. However, the "Service Detail" navbar link mentioned at http://nagios.sourceforge.net/docs/nagi ... edora.html is missing. I just see a listing of files as seen in the attached screen shot. What am I doing wrong that I don't see the "Service Detail" navbar? What value should I have for the /nagios options line?
Thank you,
Peter
You don't have permission to access /nagios/ on this server.
I investigated the issue and the file /etc/httpd/conf.d/nagios.conf contains:
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.
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>
If I change the Options line under the directory entry "/usr/local/nagios/share" to:
Options All
and run "service httpd restart", then I can access the website at http://localhost/nagios. However, the "Service Detail" navbar link mentioned at http://nagios.sourceforge.net/docs/nagi ... edora.html is missing. I just see a listing of files as seen in the attached screen shot. What am I doing wrong that I don't see the "Service Detail" navbar? What value should I have for the /nagios options line?
Thank you,
Peter