【发布时间】:2015-08-06 02:34:06
【问题描述】:
如何设置 httpd.conf 以使子目录在默认情况下不可访问,并且仍允许公共访问位于 /index.html 的主页?
我的目标是阻止对子目录的访问,但我的开发团队成员除外,但仍让公众在 /index.html 处看到主页
这是我在 httpd.conf 中的内容。它保护子目录,但是在根目录下没有人可以看到主页。
<Directory /path/to/home*>
Order deny,allow
Deny from all
</Directory>
<Directory /path/to/home/subdirectory-for-dev*>
Order deny,allow
Deny from all
allow from 111.222.333.444 #developer 1's ip
allow from 222.222.333.444 #developer 2's ip
#etc.. for other developers
</Directory>
【问题讨论】:
标签: apache httpd.conf