Apache : Ban an IP

If you wish to ban an IP address because your website is attacked for example, you can do it from Apache.
Open the configuration file of your Virtual Host and configure the Directory block.

    <Directory THE_PATH>
	AllowOverride none #Verify you have none	
        Require all granted
        Order deny,allow
        Allow from all
	Deny from 142.44.193.81 #Ban Ip 1
	Deny from 13.36.81.190  #Ban Ip 2
     </Directory>

Categories:

Tags:

No responses yet

Laisser un commentaire