September 13, 2020
Linux: 如何在Apache中禁用目录列表, Apache禁止显示目录列表, How to disable directory listing in Apache
目录清单Apache由AutoIndex模块提供。如果启用,并且Apache下特定路径或文件夹中没有DirectoryIndex文件,那么将会显示文件和文件夹列表。
常见的示例DirectoryIndex文件是index.html,index.htm,index.php和welcome.html。
当然,一个简单方便的方法就是手动创建一个DirectoryIndex文件,但是出于安全原因或其他原因,您最好是能够禁用目录浏览。
Apache可以禁用mod_autoindex,在Apache配置文件中设置适当的选项或使用htaccess文件来禁用的 自动目录索引。
如果您在平台上托管cPane… Read More