403 Forbidden 和 13 Permission Denied
403 Forbidden and 13 Permission Denied
我 运行 遇到了设置 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
好的,解决它...不确定如何授予大量权限以及如何操作 ipconfig 文件,但确实有一些事情发生了
give 755 permission to /home/me
add nagios:506:nagios,apache
add nagcmd:510:nagios,apache
然后它变为 500 错误,我将其更改为 nagios.conf 覆盖到索引并且有效
我 运行 遇到了设置 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
好的,解决它...不确定如何授予大量权限以及如何操作 ipconfig 文件,但确实有一些事情发生了
give 755 permission to /home/me
add nagios:506:nagios,apache
add nagcmd:510:nagios,apache
然后它变为 500 错误,我将其更改为 nagios.conf 覆盖到索引并且有效