apache 怎么禁止某个ip?

WBOY
Release: 2016-06-06 20:06:25
Original
1285 people have browsed it

apache怎么禁止某个ip地址访问网站, 比如禁止23.84.9.9

回复内容:

apache怎么禁止某个ip地址访问网站, 比如禁止23.84.9.9

如果要控制禁止某些非法IP访问,在Directory选项控制:

<code><directory>
Order allow,deny
Allow from all
Deny from 23.84.9.9 #阻止一个IP
Deny from 192.168.0.0/24 #阻止一个IP段
</directory>
</code>
Copy after login

或者配置.htaccess文件

<code>Deny from 23.84.9.9 #阻止一个IP
Deny from 192.168.0.0/24 #阻止一个IP段</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!