We often need to block an IP from accessing our website. Let me introduce how to disable an IP or a certain in nginx. IP section to visit the website, friends who need to know can refer to
Prohibit the writing of a single IP:
Code is as follows deny xxxx;
Prohibition of IP segment writing:
The code is as follows deny 10.0.0.0/24;
It can also be implemented to allow only one IP or some IP segment users to access, all other users are forbidden:
Code is as follows allow Xxxx; allow 10.0.0.0/24; deny all;
Restart nginx to take effect, let's take a look at the example
First set up the following configuration file in the conf directory of nginx, Named blocksip.conf: deny 95.105.25.181; //This is the IP that nginx wants to disable. In the nginx configuration file nginx.conf add: include blocksip.conf;
Restart the nginx service: /usr/local/nginx/sbin/nginx -s reload can take effect. This achieves the effect of nginx banned IP. There are many other formats of blocksip.conf:, you can configure only allowed IP access or IP segment access:
The code is as follows deny IP; allow IP; # block all ips Deny all; # allow all ips allow all;
The network segment is written like this: 192.168.1.0/24.
Todays servers pseudo-static life and death cant be loaded, and many reasons cant
When deploying ASP.NET MVC application under IIS6, it is directly set to handle all requests to ASP.
First, download the file dv_iis_url_rewrite.zip, (http://down.51one.net/newcode/b
This method mainly solves the problem that the MSSQLSERVER service on the local computer starts afte
Solve the problem that phpMyAdmin can't import database over 2M
Notes on sending attachments in windows server 2003?
Iis 7 how to cancel the directory execution permission diagram
Restart IIS old prompt does not support this interface error resolution
About the five major misunderstandings of blade servers
Deploying Cloud Computing Which data center hardware should be reserved
Hyper-V and VMware different virtual machine backup strategy
Computer Room Collection: How to solve server cooling failure?
Linux system vps server entry level security configuration guide
Technical Analysis: Seven Barriers to Increasing the Difficulties of Server Consolidation
How to open security policy for win7 system
Windows server 2008 system basic optimization skills
DISM command to release Win8.1
About the description and solution of win xp system vulnerabilities
HTML5 compatibility: IE8 browser of WP8 beats Android4.0
Microsoft inventory Windows 8 main features
Win10 Tip: One command makes the sleep file slim down 60%
How to install win10 dual system under Ghost win7 system
Install printer under Windows XP
Take you a comprehensive understanding of notebook power and battery