前面的apahce和php安装都是正常的,在配置httpd.conf文件时出现问题,报错如下:
[root@localhost conf]# /usr/local/apache2/bin/apachectl start
Syntax error on line 428 of /usr/local/apache2/conf/httpd.conf:
Invalid auth file type: //\xe7\x94\xa8\xe4\xba\x8e\xe6\xad\xa4\xe7\x9b\xae\xe5\xbd\x95\xe8\xae\xbf\xe9\x97\xae\xe8\xba\xab\xe4\xbb\xbd\xe9\xaa\x8c\xe8\xaf\x81\xe7\x9a\x84\xe6\x96\x87\xe4\xbb\xb6
我主要进行了如下修改:
1、
User daemon
Group daemon
改为:
User nagios
Group nagios
2、
将
DirectoryIndex index.html
修改为
DirectoryIndex index.html index.php
3、在配置文件末尾加上了如下代码
AddType application/x-httpd-php .php
#setting for nagios
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
AuthType Basic
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd //用于此目录访问身份验证的文件
Require valid-user
Alias /nagios "/usr/local/nagios/share"
AuthType Basic
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd
Require valid-user
系统运维 于 2014-10-17 10:57:05发表:
已经解决了,是语法错误,把 //用于此目录访问身份验证的文件 删除掉就可以了!