我遇到了设置nagios的问题,我按照http://nagios.sourceforge.net/的快速安装指南进行操作,但是在网络界面上提示 登录Web界面的电脑不是本地电脑,也是在提示输入用户名和密码之前发生的。
Forbidden
You don't have permission to access /nagios on this server.
Apache/2.2.3 (Red Hat) Server at xx.x.x.xxx Port 80
和
[error] [client xx.xxx.xx.xxx] (13)Permission denied: access to /nagios denied
我尝试解决的问题
sudo chmod 755 /home/me/nagios
SELINUX=disabled
ScriptAlias /nagios/cgi-bin "/home/me/nagios/sbin"
<Directory "/home/me/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 /home/me/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/home/me/nagios/share"
<Directory "/home/me/nagios/share">
# SSLRequireSSL
DirectoryIndex index.html index.php
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 /home/me/nagios/etc/htpasswd.users
Require valid-user
</Directory>
ls -l /home/me/nagios
total 28
drwxrwxr-x 2 me me 4096 Jun 9 13:55 bin
drwxrwxr-x 5 me me 4096 Jun 9 14:42 etc
drwxr-xr-x 2 root root 4096 Jun 9 11:19 include
drwxrwxr-x 2 me me 4096 Jun 9 12:37 libexec
drwxrwxr-x 2 me me 4096 Jun 9 12:35 sbin
drwxrwxr-x 11 me me 4096 Jun 10 10:05 share
drwxrwxr-x 5 me me 4096 Jun 10 11:24 var
这些都已安装
Installed Packages
gcc.x86_64 4.1.2-55.el5 installed
gd.i386 2.0.33-9.4.el5_4.2 installed
gd.x86_64 2.0.33-9.4.el5_4.2 installed
httpd.x86_64 2.2.3-91.el5 installed
php.x86_64 5.1.6-44.el5_10 installed
答案 0 :(得分:1)
好的解决它...不确定如何给出很多权限以及操作ipconfig文件但是做了些什么
give 755 permission to /home/me
add nagios:506:nagios,apache
add nagcmd:510:nagios,apache
然后它更改为500错误我将nagios.conf更改为索引并且它可以正常工作