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 #Ban Ip 1
	Deny from  #Ban Ip 2



No responses yet

Laisser un commentaire