LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 07-08-2009, 04:42 AM   #1
psix
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Rep: Reputation: 0
Nagios 3.1.2 + RHEL 5.3 You don't have permission to access /nagios/ on this server


Hi i install nagios on server using this manual:


http://nagios.sourceforge.net/docs/3...rt-fedora.html

but when i log in to nagios i see error:

You don't have permission to access /nagios/ on this server


i search internet but nothing find, please help.

[nagios]# ll
total 24
drwxrwxr-x 2 nagios nagios 4096 Jul 8 11:03 bin
drwxrwxr-x 3 nagios nagios 4096 Jul 8 11:03 etc
drwxrwxr-x 2 nagios nagios 4096 Jul 8 10:07 libexec
drwxrwxr-x 2 nagios nagios 4096 Jul 8 11:03 sbin
drwxrwxr-x 10 nagios nagios 4096 Jul 8 11:03 share
drwxrwxr-x 5 nagios nagios 4096 Jul 8 11:39 var

[nagios]# cat /etc/group | grep apache
apache:x:48:
nagcmd:x:501:nagios,apache


THX!
 
Old 07-08-2009, 05:00 AM   #2
gael
Member
 
Registered: Aug 2008
Posts: 41

Rep: Reputation: 15
Quote:
Originally Posted by psix View Post
but when i log in to nagios i see error:

You don't have permission to access /nagios/ on this server
Hi psix,

What do you mean you do not have permission to access nagios?
Is it on a web interface? Is it in the logs?

Assuming it is on the web interface, you have to allow apache to access /nagios/.

Here is the kind of definition you have to put in the Apache definition for nagios. I know that I have defined one in /etc/nagios2 then asked apache to read the file.

Code:
# Where the HTML pages live
Alias /nagios2 /usr/share/nagios2/htdocs

<DirectoryMatch (/usr/share/nagios2/htdocs|/usr/lib/cgi-bin/nagios2)>
        Options FollowSymLinks

        DirectoryIndex index.html

        AllowOverride AuthConfig
        Order Allow,Deny
        Allow From All

        AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /etc/nagios2/htpasswd.users
        # nagios 1.x:
        #AuthUserFile /etc/nagios/htpasswd.users
        require valid-user
</DirectoryMatch>
HTH

If you have any other question pls let us know!

G.
 
Old 07-08-2009, 05:12 AM   #3
psix
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Hi, i have no access to web interface , when i use iexplore http://server/nagios , and logon, i see :

Forbidden
You don't have permission to access /nagios/ on this server.


--------------------------------------------------------------------------------

Apache/2.2.3 (Red Hat) Server at sak-monitor02 Port 80


I have file nagios.conf in /etc/httpd/conf.d:

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>
 
Old 07-08-2009, 05:15 AM   #4
gael
Member
 
Registered: Aug 2008
Posts: 41

Rep: Reputation: 15
Did you restart / reload apache?

Did you check the logs for nagios and apache?
 
Old 07-08-2009, 05:50 AM   #5
psix
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
hi, yes i restart reload apache , in apache log i see :


[Wed Jul 08 11:29:15 2009] [error] [client 10.180.65.100] Directory index forbidden by Options directive: /usr/local/nagios/share/
 
Old 07-08-2009, 06:03 AM   #6
gael
Member
 
Registered: Aug 2008
Posts: 41

Rep: Reputation: 15
Ok try to change the Options value to:

Code:
Options FollowSymLinks
And add the following:

Code:
DirectoryIndex index.html
 
Old 07-08-2009, 06:26 AM   #7
psix
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
steel

Forbidden
You don't have permission to access /nagios/ on this server.


--------------------------------------------------------------------------------

Apache/2.2.3 (Red Hat) Server at sak-monitor02 Port 80
 
Old 07-08-2009, 06:46 AM   #8
gael
Member
 
Registered: Aug 2008
Posts: 41

Rep: Reputation: 15
Can you paste, using the "["CODE] "["/CODE] your apache configuration for nagios?
Are you sure you have an include from the main apache configuration file to the nagios configuration file?

Please let me know

Gael
 
Old 07-08-2009, 07:08 AM   #9
psix
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
I post this code:

I have file nagios.conf in /etc/httpd/conf.d:

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>




In main /etc/httpd/conf/httpd.conf i have no enteris fo nagios.
 
Old 07-08-2009, 11:01 AM   #10
gael
Member
 
Registered: Aug 2008
Posts: 41

Rep: Reputation: 15
do you know if the nagios file is loaded by apache?

A line which looks like the following:
Code:
Include /etc/apache2/sites-enabled/
Or if you do not know, you can do the following as root:

Code:
cd /etc/httpd/
grep -rH 'Include' *
thx
G.
 
Old 07-12-2009, 07:46 AM   #11
tatoosh
LQ Newbie
 
Registered: Jul 2009
Posts: 13

Rep: Reputation: 1
I have the same permission problem with nagios 3.1.2.

Here is my output of your advise:
Code:
[root@tcentos ~]# cd /etc/httpd/
[root@tcentos httpd]# grep -rH 'Include' *
conf/httpd.conf:Include conf.d/*.conf
conf/httpd.conf:#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
conf/httpd.conf:#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
conf/httpd.conf:# (You will also need to add "Includes" to the "Options" directive.)
conf/httpd.conf:        Options IncludesNoExec
conf/httpd.conf:        AddOutputFilter Includes html
Binary file modules/mod_include.so matches
grep: run/cups/cups.sock: No such device or address
grep: run/avahi-daemon/socket: No such device or address
can u give me some tipps?


here is my httpd error log:
Quote:
access to /nagios/ failed, reason: verification of user id 'nagiosadmin' not configured
^^ how to configure it ?
lol. i solved the issue:

just installed php and everythink works fine :=)
for my centos:
Quote:
yum install php -y

Last edited by tatoosh; 07-12-2009 at 08:22 AM.
 
1 members found this post helpful.
Old 11-24-2009, 03:19 PM   #12
anthr6x
LQ Newbie
 
Registered: Nov 2009
Posts: 1

Rep: Reputation: 1
hi guys,
met with the exact same problem.

problem was in http.conf. DirectoryIndex was set to index.html. nagios uses an index.php file. so i have change one virtual host to be 'DirectoryIndex index.php index.html'. works perfectly fine, while the other virtual hosts gives me the 'You don't have permission to access /nagios/ on this server.'

hope that helps

Last edited by anthr6x; 11-24-2009 at 03:24 PM.
 
1 members found this post helpful.
Old 05-14-2011, 07:26 AM   #13
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 344

Rep: Reputation: 34
Yes it was PHP issue

Installed php

Restarted Apache
Restarted nagios

Done

Excellent

Thanks for help
 
  


Reply

Tags
nagios


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure Nagios 2.0 in Rhel 5 sudheshpn Linux - Newbie 1 11-27-2008 12:32 AM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 03:47 PM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 06:33 PM
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 0 07-18-2006 09:33 PM
Permission Problem running nagios Mclewson Linux - Software 1 12-19-2004 11:45 AM


All times are GMT -5. The time now is 01:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration