linux – 如何禁用目录列表?
发布时间:2020-12-13 16:48:34 所属栏目:Linux 来源:网络整理
导读:从我可以阅读的变化 Options All Indexes FollowSymLinks MultiViews 至 Options All FollowSymLinks MultiViews 在httpd.conf中应该禁用目录列表,但我仍然可以列出它们. 我只能使用.htaccess文件禁用它. 题 如何在httpd.conf中禁用DocumentRoot和所有Virtua
从我可以阅读的变化
Options All Indexes FollowSymLinks MultiViews 至 Options All FollowSymLinks MultiViews 在httpd.conf中应该禁用目录列表,但我仍然可以列出它们. 我只能使用.htaccess文件禁用它. 题 如何在httpd.conf中禁用DocumentRoot和所有VirtualHost的目录列表? 解决方法
不,它不起作用,All表示启用除MultiViews之外的所有选项,顺序也很重要.要禁用目录列表,您需要-Indexes
Options All FollowSymLinks MultiViews -Indexes 会工作但是 Options -Indexes All FollowSymLinks MultiViews 不会像-Index之后的All那样重新启用它. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |