limit_conn question
Tomasz Pajor
nikon at puffy.pl
Wed Oct 7 16:12:32 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;
>> }
>>
>
> This is not possible now. I plan to add in the next version
>
> limit_conn conn=5 zone=resp_zone if=$limit_conn;
>
Looking forward to this, thanks for Your hard work!
More information about the nginx
mailing list