在 XAMPP 中启用目录/文件列表 [英] Enable directory/file listing in XAMPP

查看:32
本文介绍了在 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.

这篇关于在 XAMPP 中启用目录/文件列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆