Home >Backend Development >PHP Tutorial >How does Apache ban an IP address from accessing the server?

How does Apache ban an IP address from accessing the server?

小云云
小云云Original
2018-03-15 09:46:352849browse

Since currently a large number of black domain names point to open server IP addresses (the website can be directly accessed through the IP address), there are many threats to the current ranking and existence on Baidu. Therefore, as an Apache server, direct access to the website by IP address should be prohibited:

Settings:

(1) Modify httpd-vhosts.conf to:


(2) Add in httpd.conf:



Related recommendations:

How to ban IP access in PHP (without filtering search engine spiders)

php implements banning IP Code for segment access to the website_PHP tutorial

php Code to prohibit IP segments from accessing the website

The above is the detailed content of How does Apache ban an IP address from accessing the server?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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