docs: added example how to secure login page from brute force attacks.

This commit is contained in:
Daniel Dourvaris 2017-06-15 23:32:01 +02:00
parent 926a79e98e
commit 1eff40ea89

View file

@ -5,7 +5,10 @@ Use the following example to configure Nginx as a your web server.
.. code-block:: nginx
## rate limiter for certain pages to prevent brute force attacks
limit_req_zone $binary_remote_addr zone=dl_limit:10m rate=1r/s;
## custom log format
log_format log_custom '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
@ -109,6 +112,12 @@ Use the following example to configure Nginx as a your web server.
proxy_set_header Connection "upgrade";
}
location /_admin/login {
## rate limit this endpoint
limit_req zone=dl_limit burst=10 nodelay;
try_files $uri @rhode;
}
location / {
try_files $uri @rhode;
}