免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3973 | 回复: 2

[Web] apache 启动问题 [复制链接]

论坛徽章:
0
发表于 2010-08-03 15:22 |显示全部楼层
我是新手,准备配置 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>

论坛徽章:
0
发表于 2010-08-05 10:43 |显示全部楼层
问题已解决,请版主结贴,谢谢大家的关注。刚学不久,很多知识还不懂,希望在这里可以和那些大侠朋友们多交流

论坛徽章:
0
发表于 2012-08-21 16:11 |显示全部楼层
请问此问题是怎么解决的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP