1.打开 Apache 主配置文件: 这通常是 httpd.conf
或位于 /etc/apache2/
目录下的其他配置文件(取决于你的操作系统和Apache安装)
2.添加或修改 <Directory>
块: 找到或添加针对 /icons/small/
目录的 <Directory>
块,并设置适当的访问控制指令。
<Directory "/path/to/your/document/root/icons/small"> Require all denied </Directory>
或者,如果你使用的是较旧的Apache版本,可以使用:
<Directory "/path/to/your/document/root/icons/small">
Order Allow,Deny
Deny from all
</Directory>