Hello, limit_req does not work with Nginx 1.1.16 - if used on different levels. `for a in `seq 300`; do wget -O /dev/null http://localhost:8081/; done` Exepected result: 503, result is always "502 bad gateway". Down below the config file. Thanks a lot error_log /tmp/nginx-error_log info; pid /tmp/nginx.pid; events { worker_connections 65535; } http {by double - Nginx Mailing List - English
Nginx 1.1.15 does not block request if I use "try_files". This is my markup (simplified): nginx.conf: http { limit_req_zone $binary_remote_addr zone=zone1:32m rate=2r/s; limit_req_zone $binary_remote_addr zone=zone2:32m rate=12r/m; server { location @backend { limit_req zone=zone1 burst=10; limit_req zone=zone2 burst=100 nodelay;by double - Nginx Mailing List - English
Hello, I would like to limit the connections to 100 per 255.255.255.0 Is there a chance e.g. to zero the last byte of "$binary_remote_addr"? Something like: set $remote_addr_24 "/$remote_addr/\.[0-9]*$/.0/" limit_zone connectiontrack $remote_addr_24 16m; limit_conn connectiontrack 100; Thanks a lot Markusby double - Nginx Mailing List - English
Hello, Is there a chance to limit robots to 1 request per second? The down below does not work: "limit_req" directive is not allowed here Thanks a lot Markus http { limit_req_zone $http_user_agent zone=useragenttrack:1m rate=1r/s; server { listen 80; location / { if ($http_user_agent ~* "bot[^a-z]") {by double - Nginx Mailing List - English
Hello, Is there a chance to use non-blocking-io with nginx? AIO is quite broken on Linux, but "O_NONBLOCK" is not. I know, AIO would be better because you don't have to wait until the buffer is copied to the kernel-space, but what should we do... The problem, nginx is quite often in "uninterruptible sleep" (D), so the whole process is blocked. Thanks a lot Marcuby double - Nginx Mailing List - English
Hello, Is it possible to check if a variable exists, even empty? e.g. http://name.com/?hugo NGINX: if ($http_hugo) { return 404; } Will return "false". Thanks a lot Markusby double - How to...
Sry, this is better: static ngx_inline ngx_rbtree_node_t * ngx_rbtree_next(ngx_rbtree_t *rbtree, ngx_rbtree_node_t *node) { if( node->right != rbtree->sentinel ) { node = node->right; while( node->left != rbtree->sentinel ) node = node->left; } else { ngx_rbtree_node_t *root; root = rbtree->rootby double - Nginx Mailing List - English
Just a quick note, if someone needs (for an addon) to traverse an rbtree, here is the clean way: static ngx_inline ngx_rbtree_node_t * ngx_rbtree_next(ngx_rbtree_t *rbtree, ngx_rbtree_node_t *node) { ngx_rbtree_node_t *sentinel; sentinel = rbtree->sentinel; if( node->right != sentinel ) { node = node->right; while( node->left != sentinelby double - Nginx Mailing List - English
Hi Maxim, We want the same. Thanks for pointing out. Marcusby double - Nginx Mailing List - English
Hello, The root node of the nginx-rbtree is *always* NULL, because "ngx_rbtree_insert()" provides that feature. Only if the rbtree has 2 elements and you delete the root node, then "parent" of the root-node points to the deleted element. Why not fixing it? Thank you very much Marcus The corresponding code: void ngx_rbtree_insert(ngx_thread_volatile ngx_rbtree_by double - Nginx Mailing List - English
Hello, NGINX will segfault, if you delete the root node in an rbtree with two elements. Testcase: http://doppelbauer.name/nginx-testcase.c A patch is attached below. Thanks a lot Markus Doppelbauer *** a/core/ngx_rbtree.c 2010-03-19 21:07:14.342916081 +0100 --- b/core/ngx_rbtree.c 2010-03-19 21:07:56.642187263 +0100 *************** ngx_rbtree_delete(ngx_thread_volatile ng ***by double - Nginx Mailing List - English
Thanks for pointing out! Didn't know that. Marcusby double - Nginx Mailing List - English
Hello, In "ngx_slab.c": static ngx_uint_t ngx_slab_max_size; [...] void ngx_slab_init(ngx_slab_pool_t *pool) { if (ngx_slab_max_size == 0) { Could one be sure, that "ngx_slab_max_size" is always "0"? Maybe better: static ngx_uint_t ngx_slab_max_size = 0; Thanks Marcusby double - Nginx Mailing List - English
Hi Maxim, Thank you very much for your help! RTFM :-) Marcusby double - Nginx Mailing List - English
Hello, The browser hits a non-existing file. An "error_page" points to a fastcgi-application. The fastcgi thinks this is not an error and explicit sets: "Status: 200" or "Status: 302", ... One would expect that the fastcgi can overwrite the status-code. E.g.: http://www.domain.name/media/id12345 nginx returns 404, regardless of the fastcgi. http {by double - Nginx Mailing List - English
Wrong, this happened, if the POST data does not contain a <input type=file> at all. Thanks Marcusby double - Nginx Mailing List - English
Hello, If I submit a form, but keep the "<input type=file>" field empty (not browsing for a file), nginx worker segfaults. Here is the backtrace: Core was generated by `nginx: worker process '. Program terminated with signal 11, Segmentation fault. #0 0x0808by double - Nginx Mailing List - English
Hello, Is there a chance to set an IP-Range with the "HTTP Limit Zone" or the "HTTP Limit Requests" module? Like 1.2.3.4/8 -> ignore the last 8 bits of the internet address. It would reduce the required zone-size and would help against DDoS attacks. Thanks Marcusby double - Nginx Mailing List - English