Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limiting requests by zone "flood" #181

Open
extensionsapp opened this issue Aug 28, 2018 · 1 comment
Open

Limiting requests by zone "flood" #181

extensionsapp opened this issue Aug 28, 2018 · 1 comment

Comments

@extensionsapp
Copy link

Hello.

nginx.conf

limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;

ddos.conf

limit_req zone=flood burst=200 nodelay;

domain.conf

    include /etc/nginx/bots.d/ddos.conf;
    ...
    location /images/ {
        rewrite           "^\/images\/(poster|picture)\/(medium|small)\/.*img([0-9]+).*\.jpg$" "/$1/$2/$3.jpg" break;
        root              /var/local/images;
        expires           30d;
        access_log        off;
        autoindex         off;
        add_header        Cache-Control "public, no-transform";
        proxy_cache       cinemacache;
        proxy_cache_valid 404 500 502 503 504 1m;
        proxy_cache_valid any 30d;
        try_files $uri    /poster/no-poster.jpg /poster/small/629951.jpg =404;
    }

And have error /images/. But referrer and URL, it`s my website.

2018/08/28 05:38:12 [error] 2612#2612: *18433 limiting requests, excess: 200.640 by zone "flood", request: "GET /images/poster/medium/img273679-devochka-pol...

The site itself floods?

@GwynethLlewelyn
Copy link

Interesting, I have the same issue. I had to increase the rate, because internal requests were constantly being blocked via fail2ban...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants