• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Rate limiting on Ngnix

Html

New Pleskian
How do I use Ngnix rate limits?
Code:
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
server {
    location /login/ {
        limit_req zone=mylimit;
        proxy_pass http://my_upstream;
    }
}
in the additional Nginx directive of Plesk???
I just tried this...

Server directory is not allowed here...

How should I use this properly?
 
I cant understand, why of a question the user shull open a login form? He was logged in, otherwise he cant write! More interessting is, why a feature, they is written in Nginx documentation in 2017 on page nginx - blog rate-limiting-nginx in plesk in the newest version of plesk in the year 2020 (so 3 years later) not function?
Equal many times plesk offer a high security, but this not given! Today many users have change to newest php versions and to nginx, but nothing is done in punto security in plesk, but nginx can handle many of this features, but they cant set in plesk and btw all scripts for fail2ban and nginx are missing too! So server admins, they change their users from apache to nginx shut of the security, the in apache before exists!
 
There is no build-in functionality in Plesk to limit download speed for website files in Plesk. As a workaround, it can be performed by adding the additional directives for corresponding services. In this instruction download speed will be limited to the 350 Kb/s.

If static files are served by Nginx:

Note: this instruction should be used if Serve static files directly by nginx is enabled, or Proxy mode is disabled in Domains > example.com > Apache & nginx Settings.
  1. Go to Domains > example.com > Apache & nginx Settings.
  2. Add one of the configurations below into the Additional nginx directives field:
    • To limit download speed for the whole website:
      Code:
      limit_rate 350k;
    • To limit download speed for all files in downloads folder and all its subfolders:
      Code:
      location /downloads {
      limit_rate 350k;
      }
  3. Press the OK button to apply changes.
 
The nginx limit_req directive can be included at /etc/nginx/nginx.conf inside http block.


NGINX:
http {
........

    limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
..........   
}


Then, the limit_"req zone=mylimit;" can be included in the plesk Additional nginx directives at proper location

NGINX:
    location /login/ {
        limit_req zone=mylimit;
    }
 
@Paulo_o your solution makes sense. But, will it be discarded upon Plesk version updates? If true, this will trigger an error when it happens. I believe there's a reason why @IgorG asked for a vote
 
Back
Top