The apache + php + mysql website will access the ip address 404 times. is access from the ip address directly prohibited at the access layer?

Source: Internet
Author: User
Can the apache + php + mysql website access requests by ip address 404 times, and direct access by ip address is prohibited at the access layer? Can an apache website access an ip address for 404 times and prohibit access by ip addresses at the access layer? & Nbsp; problem explanation: a large number of files that do not exist on the website are scanned at the same ip address. 4 apache + php + mysql websites can access the website 404 times through ip addresses, is access by ip addresses directly prohibited at the access layer?
Can an apache website access an ip address for 404 times and prohibit access by ip addresses at the access layer?
Explanation: a 404 error occurs when a large number of files that do not exist on the website are scanned at the same ip address.
Therefore, the above idea is generated. if you want to directly use the apache service layer or the php service layer to lock the person with a 404 error in the same ip address, access is directly prohibited. Or prohibit access within a period of time.
Ask, if the operation?

------ Solution --------------------
Add in the. htaccess file
ErrorDocument 404/404 .php
Order deny, allow
Deny from ip list (separated by spaces)

You do not need to restart apache after modifying the. htaccess file.
You can record $ _ SERVER ['remote _ ADDR '] and add $ _ SERVER ['remote _ ADDR'] to the ip address list in 404.php.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.