Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed nagios under freebsd 9, but can't figure out the right way for it to be public in the browser (from other pc's). I think that the problem is in the indexes or that there is no index file (other than main.php). Apache says that syntax is ok. The permissions of the dir are 777. The logs say:

Directory index forbidden by Options directive: /usr/local/www/nagios/.

This is my configuration:

ScriptAlias /nagios/cgi-bin/ /usr/local/www/nagios/cgi-bin/
Alias /nagios /usr/local/www/nagios/

<Directory /usr/local/www/nagios>    
    Options +Indexes FollowSymLinks +ExecCGI
    AllowOverride Indexes AuthConfig FileInfo
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUSerFile /usr/local/etc/nagios/htpasswd.users
    Require valid-user
</Directory>

<Directory /usr/local/www/nagios/cgi-bin>    
    Options +ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUSerFile /usr/local/etc/nagios/htpasswd.users
    Require valid-user
</Directory>

I think that the problem is in indexes, maybe? When I remove the options it's public and available but lists the files and says that indexes are forbidden.

share|improve this question
    
check the permission for /usr/local/etc/nagios/htpasswd.users or make sure it's exists. check your httpd log. –  chocripple Mar 5 '12 at 1:28
1  
This is really an apache httpd question –  Keith Apr 11 '12 at 18:21

1 Answer 1

Hmm, your installation should definatly have an Index.php file!

I would make sure everything is installed correctly first!

Next, I would make sure that the Nagios web files are actually in the file path you mention above and not at:

/usr/local/etc/nagios/share

Also, your nagios.conf is slightly wrong:

Alias /nagios "/usr/local/www/nagios/"
<Directory "/usr/local/www/nagios">

Options +Indexes FollowSymLinks +ExecCGI

AllowOverride Indexes AuthConfig FileInfo

Order allow,deny

Allow from all

AuthName "Nagios Access"

AuthType Basic

AuthUSerFile /usr/local/etc/nagios/htpasswd.users

Require valid-user

</Directory>

ScriptAlias /nagios/cgi-bin/ "/usr/local/www/nagios/cgi-bin/"

<Directory "/usr/local/www/nagios/cgi-bin">

Options +ExecCGI

AllowOverride None

Order allow,deny

Allow from all

AuthName "Nagios Access"

AuthType Basic

AuthUSerFile /usr/local/etc/nagios/htpasswd.users

Require valid-user

</Directory>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.