Order allow,deny
Deny from all
</Files>
Order allow,deny
Deny from all
</Directory>
Order allow,deny
Deny from all
</FilesMatch>
Order allow,deny
Deny from all
</Location>
Order allow,deny
Deny from all
</Proxy>
Order allow,deny
Allow from all
Deny from 10.0.0.1 #阻止一个IP
Deny from 192.168.0.0/24 #阻止一个IP段
</Directory>
Order deny,allow
Deny from all
All from example.com #允许某个域名
All from 10.0.0.1 #允许一个iP
All from 10.0.0.1 10.0.0.2 #允许多个iP
Allow from 10.1.0.0/255.255.0.0 #允许一个IP段,掩码对
All from 10.0.1 192.168 #允许一个IP段,后面不填写
All from 192.168.0.0/24 #允许一个IP段,网络号
</Directory>
Options -Indexes FollowSymLinks
AllowOverride All
<Files ~ “.txt”>
Order allow,deny
Deny from all
</Files>
</Directory>
使用apachectl configtest 或 -t 命令行选项检查您的配置文件是否存在语法错误