“尝试服务目录:”Nagios 通过 httpd 错误日志抛出错误

“尝试服务目录:”Nagios 通过 httpd 错误日志抛出错误

我正在尝试通过 yum 在 Ec2 上的 centos vm 上安装 Nagios。

当我尝试重新启动 httpd 来启动 Nagios 时,我发现 http 错误日志中出现了这个错误

Attempt to serve directory: /usr/share/nagios/html/

这是我的 nagios.conf

<VirtualHost *>
        ServerName nagios.xx.com
        ServerAlias nagios.xx.com

        ScriptAlias /nagios/cgi-bin/ /usr/lib64/nagios/cgi-bin/
        <Directory /usr/lib64/nagios/cgi-bin/>
           Options ExecCGI
           order deny,allow
           deny from all
           allow from 127.0.0.1
           AuthType Basic
           AuthUserFile /etc/nagios/passwd
           AuthName "nagios"
           require valid-user
        </Directory>

        Alias / /usr/share/nagios/html/
        <Directory /usr/share/nagios/html/>
           Options None
           order deny,allow
           deny from all
           allow from 127.0.0.1
           AuthType Basic
           AuthUserFile /etc/nagios/htpasswd.users
           AuthName "nagios"
           require valid-user
        </Directory>
</VirtualHost>

这是 html 目录 perm

drwxr-xr-x 8 apache apache 4096 Jun 20 17:53 html 

父目录具有如下权限

纳吉奥斯

drwxr-xr-x   3 root root  4096 Jun 20 17:53 nagios

分享

drwxr-xr-x 103 root root  4096 Jun 20 17:53 share

用户

drwxr-xr-x 13 root root  4096 Feb 24 16:30 usr

有人可以帮我吗?

答案1

如果您想从域的 / 运行它,请替换Alias / /usr/share/nagios/html/为。DocumentRoot /usr/share/nagios/html/

顺便说一句,您知道您只能使用 从本地盒子访问目录allow from 127.0.0.1,对吗?(除非您使用它来反向代理)

相关内容