11.25 配置防盗链
<Directory /data/wwwroot/abc.com>
SetEnvIfNoCase Referer "http://www.abc.com" local_ref
SetEnvIfNoCase Referer "http://abc.com" local_ref
SetEnvIfNoCase Referer "^$" local_ref
<filesmatch "\.(txt|doc|mp3|zip|rar|jpg|gif)">
Order Allow,Deny
Allow from env=local_ref
</filesmatch>
</Directory>
11.26 访问控制Directory
<Directory /data/wwwroot/abc.com/admin/>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>
针对目录实现控制. 控制对象为来源ip
11.27 访问控制FilesMatch
<Directory /data/wwwroot/abc.com/>
<FilesMatch "admin.php(.*)">
Order deny,allow
Deny from all
Allow from 127.0.0.1
</FilesMatch>
</Directory>
来源:oschina
链接:https://my.oschina.net/u/3803395/blog/1812022