The following tutorial column ofPagoda Panelwill introduce to you the tutorial on prohibiting IP access (anti-malicious analysis) in nginx environment. I hope it will be helpful to friends in need!
1. Bind a default site (an idle site) and all domain names not bound to the Pagoda panel will access this default site
2. Modify the site configuration file and add the following code below server_name (444 can be changed to an error code such as 404 or 502):
return 444;
Specific As shown in the picture below:
After saving the configuration file and using the IP to access the site, it will display "This webpage cannot operate normally". See the picture below for details:
Indicates that we have successfully banned the IP from accessing the site.
The above is the detailed content of Disable IP access in pagoda nginx environment. For more information, please follow other related articles on the PHP Chinese website!