gpt4 book ai didi

Apache 2.4 : How to allow access to a whole directory except a subdirectory in it

转载 作者:行者123 更新时间:2023-12-05 08:10:01 25 4
gpt4 key购买 nike

我在 httpd.conf 中尝试过,但它不起作用,我仍然允许我访问子文件夹“report”。

<Directory "c:/Apache24/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

<Directory "c:/Apache24/htdocs/report">
Require all denied
</Directory>

最佳答案

您需要在目录中允许或拒绝。

<Directory "c:/Apache24/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

<Directory "c:/Apache24/htdocs/report">
Allow from None
Order allow,deny
</Directory>

Apache 文档中的更多详细信息:http://httpd.apache.org/docs/current/mod/mod_access_compat.html#allow

关于 Apache 2.4 : How to allow access to a whole directory except a subdirectory in it,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29522835/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com