搜尋

首頁  >  問答  >  主體

如何讓apache顯示目錄

環境是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_leeringa_lee2836 天前599

全部回覆(1)我來回復

  • PHP中文网

    PHP中文网2017-05-16 17:02:52

    Options Indexes FollowSymLinks
    去掉Indexes
    变为
    Options FollowSymLinks

    回覆
    0
  • 取消回覆