1. Add the following code to http{} in nginx.conf: limit_conn_zone $binary_remote_addr zone=perip:10m; limit_conn_zone $server_name zone=perserver:10m; 2. Add the following code to the server{} configuration of the website that needs to limit the number of concurrent connections and download bandwidth: limit_conn perip 2; limit_conn perserver 20; limit_rate 100k; Supplementary explanation of the following parameters: $binary_remote_addr is to limit the same client IP address; $server_name is used to limit the maximum number of concurrent connections on the same server; limit_conn is to limit the number of concurrent connections; limit_rate is to limit the download speed; The above nginx configuration method to limit the access frequency of the same IP is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: React native realizes the monitoring gesture up and down pull effect
>>: MySQL FAQ series: How to avoid a sudden increase in the size of the ibdata1 file
Generate SSL Key and CSR file using OpenSSL To co...
Table of contents Requirement Description Problem...
Preface In order to ensure the consistency and in...
Table of contents 1. Object literals 2. The new k...
Through an example, I shared with you the solutio...
Without further ado, I will post the code for you...
Due to hardware reasons, the machines may not kee...
Table of contents Preface Direct filling method f...
By understanding how tomcat handles concurrent re...
I started using Linux for development and enterta...
1. Add the following code to http{} in nginx.conf...
1. Problem The problems encountered when initiali...
Suppose a user management system where each perso...
There are many loop statements in JavaScript, inc...
Hello everyone, I am Liang Xu. When using Linux, ...