在 XAMPP 中启用目录/文件列表

在 XAMPP 中启用目录/文件列表

问题描述:

如何在 XAMPP 中启用目录和文件列表?在 WAMP 中,它默认启用.

How to enable directory and file listing in XAMPP ? In WAMP it is by default enabled.

我的 Xampp httpd.conf 在 xampp 目录项下已经有了 Indexes 选项删除所有默认的#comment 行,如下所示:

My Xampp httpd.conf already had the Indexes option under the xampp directory entry Removing all the default #comment lines, it looks like this:

<Directory "C:/xampp/htdocs">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

但是,我将本地根映射到了htdocs"之外的不同目录(根据这篇文章 在 htdocs 之外制作 XAMPP/Apache 服务文件 ) 以便为所有目录启用此功能,我必须找到正上方的条目,并添加索引"一词到它.

But, I have my local root mapped to a different directory, outside of 'htdocs', (as per this post Make XAMPP/Apache serve file outside of htdocs ) so to enable this for all directories, I had to find the entry just above that, and add the word "Indexes" to it.

<Directory />
    Options FollowSymLinks Indexes
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

注意我永远不会为生产服务器上的所有目录启用此功能,但在本地它非常有用.

Note I would never enable this for all directories on a production server, but locally it is quite useful.