如何讓apache顯示目錄
ringa_lee
ringa_lee 2017-05-16 17:00:52
0
1
571

環境是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)
洪涛

Options Indexes FollowSymLinks
去掉Indexes
变为
Options FollowSymLinks

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板