.
Limit_req_zone $binary_remote_addr zone=one: 10 m rate=10 r/s;
.
}
Server
{
.
The location ~. * \. (HTML | HTM | | GIF JPG | jpeg | BMP | PNG | ico | TXT | js | CSS) $
{
.
Expires 7 d;
}
The location/{
Limit_req zone=one;
The root HTML;
The index index. HTML index. The JSP;
.
}
}
This is the configuration file, but sent a second request will show 503 1 SEC (sent a total of several, but not the js. CSS. JPG and so on request only two is different (request), I'm limit_req zone=one followed by burst=1 is ok, I see the meaning of the document of nginx, rate=10 r/s; Should be allowed a second ten, more than 10 is only related to burst, why didn't rate=10 r/s work
CodePudding user response:
You put below the location/of course, js, CSS. JPG also calculated into the request, dozens of requests a page, not more than 10