mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-22 22:34:05 -07:00
rate limit new definition
This commit is contained in:
parent
4526333fc9
commit
f05ff062d8
1 changed files with 3 additions and 3 deletions
|
@ -3,10 +3,10 @@
|
||||||
# This installer will install hosting-firewall.tpl (nginx template) that will:
|
# This installer will install hosting-firewall.tpl (nginx template) that will:
|
||||||
# + allow 1 http request per second per IP address (sent to your server, more precisely to your PHP-FPM)
|
# + allow 1 http request per second per IP address (sent to your server, more precisely to your PHP-FPM)
|
||||||
# + allow 2 parallel http connections per IP address (sent to your PHP-FPM)
|
# + allow 2 parallel http connections per IP address (sent to your PHP-FPM)
|
||||||
# + make burst (queue) for 7 additional http requests in the same second, but it will processed each request each second (so this will handle natural peaks that CMS can generate to itself)
|
# + make burst (queue) for 7 additional http requests in the same second, first 3 will be processed immediately, 4 others will processed each request each second (so this will handle natural peaks that CMS can generate to itself)
|
||||||
# + if client fills allowed queue, additional requests will be denied
|
# + if client fills allowed queue, additional requests will be denied
|
||||||
#
|
#
|
||||||
# Generally, this nginx template will prevent bad bots to run hundreds parallel http requests against your site, which will probably cause denial-of-service on your server
|
# Generally, this nginx template will prevent bad bots to run hundreds parallel http requests against your site, which will probably cause denial-of-service on your server.
|
||||||
|
|
||||||
grepc=$(grep -c 'limit_conn_zone' /etc/nginx/nginx.conf)
|
grepc=$(grep -c 'limit_conn_zone' /etc/nginx/nginx.conf)
|
||||||
if [ "$grepc" -eq 0 ]; then
|
if [ "$grepc" -eq 0 ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue