11.25 配置防盗链 11.26 访问控制Directory 11.27 访问控制FilesMatch
加入白名单
可以访问了
[root@lizhipenglinux01 111.com]# /usr/local/apache2.4/bin/apachectl graceful
[root@lizhipenglinux01 111.com]# !curl
curl -x127.0.0.1:80 111.com/ace.jpg -I
HTTP/1.1 200 OK
Date: Sat, 03 Mar 2018 13:13:15 GMT
Server: Apache/2.4.29 (Unix) PHP/5.6.30
Last-Modified: Thu, 16 Jun 2016 01:31:17 GMT
ETag: "9385-5355b31c76340"
Accept-Ranges: bytes
Content-Length: 37765
Content-Type: image/jpeg
[root@lizhipenglinux01 111.com]# curl -e "http://www.qq.com/123.txt" -x127.0.0.1:80 111.com/ace.jpg -I
HTTP/1.1 403 Forbidden
Date: Sat, 03 Mar 2018 13:14:36 GMT
Server: Apache/2.4.29 (Unix) PHP/5.6.30
Content-Type: text/html; charset=iso-8859-1
[root@lizhipenglinux01 111.com]# curl -e "http://111.com/123.txt" -x127.0.0.1:80 111.com/ace.jpg -I
HTTP/1.1 200 OK
Date: Sat, 03 Mar 2018 13:15:14 GMT
Server: Apache/2.4.29 (Unix) PHP/5.6.30
Last-Modified: Thu, 16 Jun 2016 01:31:17 GMT
ETag: "9385-5355b31c76340"
Accept-Ranges: bytes
Content-Length: 37765
Content-Type: image/jpeg