apache 启动问题
时间:2010-08-03
来源:互联网
我是新手,准备配置 apache+nagios 系统,现在到了配置文件阶段,apache的httpd.conf文件末尾添加了以下代码后,还有修改apache默认用户为nagios, User nagios; Group nagios
添加代码
#setting for nagios
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
//Cgi文件所在目录
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
//nagios页面文件目录
AuthType Basic
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd //验证文件路径
Require valid-user
再启动httpd 就报错
/usr/local/apache/bin/apachectl start
Syntax error on line 415 of /usr/local/apache/conf/httpd.conf:
AllowOverride not allowed here
/usr/local/apache/bin/apachectl start: httpd could not be started
配置文件里面多处都有诸如上面的AllowOverride 变量类的定义啊,就不知其出错原因了,请大侠们指教。
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/usr/local/apache/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
添加代码
#setting for nagios
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
//Cgi文件所在目录
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
//nagios页面文件目录
AuthType Basic
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd //验证文件路径
Require valid-user
再启动httpd 就报错
/usr/local/apache/bin/apachectl start
Syntax error on line 415 of /usr/local/apache/conf/httpd.conf:
AllowOverride not allowed here
/usr/local/apache/bin/apachectl start: httpd could not be started
配置文件里面多处都有诸如上面的AllowOverride 变量类的定义啊,就不知其出错原因了,请大侠们指教。
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/usr/local/apache/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
作者: 我不专业 发布时间: 2010-08-03
问题已解决,请版主结贴,谢谢大家的关注。刚学不久,很多知识还不懂,希望在这里可以和那些大侠朋友们多交流
作者: 我不专业 发布时间: 2010-08-05
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28