limit_conn question

Tomasz Pajor nikon at puffy.pl
Tue Oct 6 17:43:10 MSD 2009


Why limit_conn is not allowed in such a configuration?

#http context

limit_zone resp_zone $binary_remote_addr 64m;
geo $limit_conn {
    default 1;
    x.x.x.x/32 0;
    z.z.z.z/32 0;
    y.y.y.y/32 0;
}

#server context
server {
    listen 80;

    if ($limit_conn) {
        limit_conn resp_zone 5;
    }

    location / { proxy_pass http://127.0.0.1:8080; }

    error_page 500 501 502 503 504 505 /50x.html;
    location /50x.html {
        #root /vhosts/overload;
        root /vhosts/maintenance;
    }

    include base/status;
}







More information about the nginx mailing list