V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
kstsca
V2EX  ›  Linux

搞了两天没搞定,为什么根目录索引不能启用目录浏览呢,而二级目录就能目录浏览。

  •  
  •   kstsca · 2013-02-08 00:44:07 +08:00 · 2806 次点击
    这是一个创建于 4092 天前的主题,其中的信息可能已经有所发展或是发生改变。
    根目录访问显示

    Forbidden You don't have permission to access / on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    而二级目录以上目录可以正常索引

    索引方式

    <Directory "/hd2/www/"> Options Indexes FollowSymLinks </Directory>

    errer.log信息

    [Fri Feb 08 00:30:17 2013] [error] [client 222.93.25.158] Directory index forbidden by Options directive: /hd2/www/xxx.net/code/
    [Fri Feb 08 00:30:17 2013] [error] [client 222.93.25.158] File does not exist: /hd2/www/xxx.net/code/error

    inux centos apache 配置
    3 条回复    1970-01-01 08:00:00 +08:00
    cjou
        1
    cjou  
       2013-02-08 03:02:01 +08:00 via iPhone
    首先检查一下www这个目录的权限
    kstsca
        2
    kstsca  
    OP
       2013-02-08 08:31:47 +08:00
    www权限 没问题肯定
    因为我在做过子目录 也报这样错误。
    kstsca
        3
    kstsca  
    OP
       2013-02-08 09:09:21 +08:00
    搞定了 apache 配置文件不止一个httpd.conf
    还有ssl.conf welcome.conf
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4355 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:12 · PVG 18:12 · LAX 03:12 · JFK 06:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.