q2009a06z22 发表于 2018-11-18 08:44:54

访问控制FilesMatch

访问控制FilesMatch

  filesMatch针对链接进行控制。


# vim /usr/local/apache2.4/conf/extra/httpd-vhosts.conf


Order deny,allow
Deny from all
Allow from 127.0.0.1


(增加的配置有必须是成对出现 )
测试结果:# curl -x127.0.0.1:80 'http://www.111.com/admin.php?/dddjjjlllsahog' -I
HTTP/1.1 404 Not Found
Date: Thu, 03 Aug 2017 16:48:12 GMT
Server: Apache/2.4.27 (Unix) PHP/5.6.30
Content-Type: text/html; charset=iso-8859-1
# curl -x192.168.212.10:80 'http://www.111.com/admin.php?/dddjjjlllsahog' -I
HTTP/1.1 403 Forbidden
Date: Thu, 03 Aug 2017 16:48:35 GMT
Server: Apache/2.4.27 (Unix) PHP/5.6.30
Content-Type: text/html; charset=iso-8859-1
(这里访问的域名必须是servername 后面跟的域名)


页: [1]
查看完整版本: 访问控制FilesMatch