Want to subscribe to topics you're interested in?
Become a Member

Nginx Limit per ip

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Oct 18, 2014.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,169
    304
    83
    May 31, 2014
    Ratings:
    +551
    Local Time:
    3:48 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    Is this edit enough to limit connections per ip on the server in general and not per domain only?
    edit usr/local/nginx/conf/nginx.conf

    add under this:
    large_client_header_buffers 4 256k;

    this:
    limit_conn limit_per_ip 80;
    limit_conn_zone limit_per_ip $binary_remote_addr 16m;

    restart nginx

    I want to limit per ip 80 connections.

    Thanks !!!
     
  2. eva2000

    eva2000 Administrator Staff Member

    38,041
    8,357
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,874
    Local Time:
    11:48 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    haven't done it that way myself before so try it

    usually done on vhost level

    whole point is to try it out and see for yourself

    For more general Nginx stuff also read, search and ask at Nginx Forum :)
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,169
    304
    83
    May 31, 2014
    Ratings:
    +551
    Local Time:
    3:48 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    I was read also that recommendation from user floren so maybe he knows to help :)

    Thanks George :)
     
..