How to turn off IP access for Linux Apache server

  
                

The Apache server is the most widely used web server software, so Linux users need to deal with Apache servers often. Some Linux users want the Apache server to block IP access. How do I set it up? Let's take a look at the specific operation method.

Solution:

Web Hosting .htaccess usage, it is no server administrative rights practices

order allow, deny

allow from All

deny from 124.114.0.

deny from 124.115.0.

There is a server management permission method, the example method is as follows.

options indexes followsymlinks

allowoverride none

order allow,deny

allow from all

deny from 124.114.0.

deny from 124.115.0.

deny,allow

The deny directive is evaluated before the allow directive. All access is allowed by default. Any client that does not match the deny command or matches the allow command is allowed to access the server.

If you want your Apache server in Linux to block IP access, try this method above, I believe it will bring you a surprise.

Copyright © Windows knowledge All Rights Reserved