Change the above to following and restart httpd service.
Main Topics
Browse All TopicsGreetings all!
I have installed the Nagios and used very complete directions at http://nagios.sourceforge.
But i try to access site at http://servername.com/nagi
Looking in the error_log file shows:
Directory index forbidden by Options directive: /usr/local/nagios/share/
Here is what my nagios.conf file looks like:
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpa
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpa
Require valid-user
</Directory>
I have looked at all forums, and see nothing that can help. Please help!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
It sounds like your attempt to browse the directory is not finding a default document (or there is no default set), and you do not allow for directory browsing in that directory.
Take a look at these directives. I recommend default document first. The "Options +Indexes" is probably not what you are looking for.
http://httpd.apache.org/do
http://httpd.apache.org/do
linuxpig: All your web files are belonging to root!! This should not happen.. Especially dynamic contnent might not be updated this way. There's a great probability that the system cant even read your nagios config file. Youur naigos folder should belong to the user nagios:nagios.
Will you cange it and retry?
cd /usr/local
chown -R nagios.nagios nagios
Changed as requested, still same problem. Here is my /usr/local/nagios dir
drwxrwxr-x 2 nagios nagios 4096 Mar 01 07:12 bin
drwxrwxr-x 3 nagios nagios 4096 Mar 01 07:16 etc
drwxrwxr-x 2 nagios nagios 4096 Mar 01 07:12 libexec
drwxrwxr-x 2 nagios nagios 4096 Mar 01 07:12 sbin
drwxrwxr-x 9 nagios nagios 4096 Mar 01 07:12 share
drwxrwxr-x 5 nagios nagios 4096 Mar 01 07:20 var
Here is my share dir,
-rw-rw-r-- 1 nagios nagios 576 Mar 02 07:12 config.inc.php
drwxrwxr-x 2 nagios nagios 4096 Mar 02 07:12 contexthelp
drwxrwxr-x 3 nagios nagios 4096 Mar 02 07:12 docs
drwxrwxr-x 3 nagios nagios 4096 Mar 02 07:12 images
drwxrwxr-x 2 nagios nagios 4096 Mar 02 07:12 includes
-rw-rw-r-- 1 nagios nagios 718 Mar 02 17:02 index.php
-rw-rw-r-- 1 nagios nagios 3092 Mar 02 17:02 main.php
drwxrwxr-x 2 nagios nagios 4096 Mar 02 17:02 media
-rw-rw-r-- 1 nagios nagios 26 Mar 02 17:02 robots.txt
-rw-rw-r-- 1 nagios nagios 5722 Mar 02 17:02 side.php
drwxrwxr-x 2 nagios nagios 4096 Mar 02 17:02 ssi
drwxrwxr-x 2 nagios nagios 4096 Mar 02 17:02 stylesheets
Here is my nagios.conf
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Dire
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpa
Require valid-user
</Directory>
Alias /nagios /usr/local/nagios/share
<Dir
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpa
Require valid-user
</Directory>
I found the errors in my config file. Im using CentOS5 so I dont know how nagios installed on your OS.
There were 2 errors. First of all there was no / behind the locations. And the folders were wrong. The original conf did this:
ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
<Directory "/usr/lib/nagios/cgi">
Alias /nagios "/usr/share/nagios"
<Directory "/usr/share/nagios">
IT SHOULD BE THIS:
ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi-bin/"
<Directory "/usr/lib/nagios/cgi-bin/"
Alias /nagios "/usr/share/nagios/html/"
<Directory "/usr/share/nagios/html/">
Full config here, I dont need any auth because its all internal but you can just uncomment them and make the htpasswd file if you want.
ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi-bin/"
<Directory "/usr/lib/nagios/cgi-bin/"
# 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 /etc/nagios/htpasswd.users
# Require valid-user
</Directory>
Alias /nagios "/usr/share/nagios/html/"
<Directory "/usr/share/nagios/html/">
# 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 /etc/nagios/htpasswd.users
# Require valid-user
</Directory>
Business Accounts
Answer for Membership
by: KeremEPosted on 2009-05-11 at 13:49:13ID: 24358961
Do you have SELinux installed ??
If it is then probably you' nagios script can not run because of the executin has bnn stooped by it.
To correct the problem execute this problem:
chcon -R -t httpd_sys_script_rw_t /usr/local/nagios/var/rw/
I hope this helps.
Cheers,
K.