我在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>
答案 0 :(得分:-1)
目录中需要允许或拒绝。
<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