如何让apache显示目录
ringa_lee
ringa_lee 2017-05-16 17:00:52
[Linux讨论组]

环境是wamp3,apache是2.4的,之前用wamp2.5的时候,documentroot指定为h:demo(主目录下没有index.php之类的),每次打开localhost是一个所有项目的目录,这次更新完wamp3,发现打开localhost是not found,但是输入localhost/test/ 能打开项目(test下有index.php)说明documentroot什么的配置是对的,我查了下如何显示apache目录。
回答说http.conf中
Options Indexes FollowSymLinks
可我发现我是有这项的

<Directory "H:/Demo">
    #
    # 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.4/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:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #

#   onlineoffline tag - don't remove
    Require local
</Directory>
ringa_lee
ringa_lee

ringa_lee

全部回复(1)
PHP中文网

Options Indexes FollowSymLinks
去掉Indexes
变为
Options FollowSymLinks

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号