Custom Query (2296 matches)
Results (13 - 15 of 2296)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#2599 | invalid | Nginx 1.24 building from source with pcre2 on Ubuntu leading to issues | ||
Description |
Ubuntu Version: Linux anadev001 6.5.0-15-generic #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 12 18:54:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux make version: GNU Make 4.3 Nginx version: nginx-1.24.0.tar.gz PCRE2 Version: pcre2-10.42.tar.gz gcc version: gcc version 11.4.0 Getting the below compilation issues using the above configuration: make -f objs/Makefile gcc -c -fPIC -I/home/umarsam/projectwork/nginx/../pcre/src/include -I/home/umarsam/projectwork/nginx/../zlib/prod/include -I/home/umarsam/projectwork/nginx/../gd/prod/include -I/home/umarsam/projectwork/nginx/../openssl/prod/include -I. -I src/core -I src/event -I src/event/modules -I src/os/unix -I /home/umarsam/projectwork/nginx/../pcre/prod/include -I /home/umarsam/projectwork/nginx/../openssl/prod/include -I /home/umarsam/projectwork/nginx/../zlib/prod/include -I /home/umarsam/projectwork/gd/prod/include -I objs -I src/http -I src/http/modules -I src/http/v2 \ -o objs/src/http/modules/ngx_http_rewrite_module.o \ src/http/modules/ngx_http_rewrite_module.c src/http/modules/ngx_http_rewrite_module.c: In function ‘ngx_http_rewrite’: src/http/modules/ngx_http_rewrite_module.c:309:5: error: unknown type name ‘ngx_http_script_regex_code_t’; did you mean ‘ngx_http_script_file_code_t’? 309 | ngx_http_script_regex_code_t *regex; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ngx_http_script_file_code_t src/http/modules/ngx_http_rewrite_module.c:310:5: error: unknown type name ‘ngx_http_script_regex_end_code_t’; did you mean ‘ngx_http_script_return_code_t’? 310 | ngx_http_script_regex_end_code_t *regex_end; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ngx_http_script_return_code_t src/http/modules/ngx_http_rewrite_module.c:314:47: error: ‘ngx_http_script_regex_code_t’ undeclared (first use in this function); did you mean ‘ngx_http_script_file_code_t’? 314 | sizeof(ngx_http_script_regex_code_t)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ngx_http_script_file_code_t src/http/modules/ngx_http_rewrite_module.c:314:47: note: each undeclared identifier is reported only once for each function it appears in src/http/modules/ngx_http_rewrite_module.c:336:10: error: request for member ‘regex’ in something not a structure or union 336 | regex->regex = ngx_http_regex_compile(cf, &rc); | ^~ src/http/modules/ngx_http_rewrite_module.c:336:20: warning: implicit declaration of function ‘ngx_http_regex_compile’; did you mean ‘ngx_regex_compile’? [-Wimplicit-function-declaration] 336 | regex->regex = ngx_http_regex_compile(cf, &rc); | ^~~~~~~~~~~~~~~~~~~~~~ | ngx_regex_compile src/http/modules/ngx_http_rewrite_module.c:337:14: error: request for member ‘regex’ in something not a structure or union 337 | if (regex->regex == NULL) { | ^~ src/http/modules/ngx_http_rewrite_module.c:341:10: error: request for member ‘code’ in something not a structure or union 341 | regex->code = ngx_http_script_regex_start_code; | ^~ src/http/modules/ngx_http_rewrite_module.c:341:19: error: ‘ngx_http_script_regex_start_code’ undeclared (first use in this function); did you mean ‘ngx_http_script_start_code’? 341 | regex->code = ngx_http_script_regex_start_code; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ngx_http_script_start_code src/http/modules/ngx_http_rewrite_module.c:342:10: error: request for member ‘uri’ in something not a structure or union 342 | regex->uri = 1; | ^~ src/http/modules/ngx_http_rewrite_module.c:343:10: error: request for member ‘name’ in something not a structure or union 343 | regex->name = value[1]; | ^~ src/http/modules/ngx_http_rewrite_module.c:351:14: error: request for member ‘add_args’ in something not a structure or union 351 | regex->add_args = 1; | ^~ src/http/modules/ngx_http_rewrite_module.c:360:14: error: request for member ‘status’ in something not a structure or union 360 | regex->status = NGX_HTTP_MOVED_TEMPORARILY; | ^~ src/http/modules/ngx_http_rewrite_module.c:361:14: error: request for member ‘redirect’ in something not a structure or union 361 | regex->redirect = 1; | ^~ src/http/modules/ngx_http_rewrite_module.c:370:18: error: request for member ‘break_cycle’ in something not a structure or union 370 | regex->break_cycle = 1; | ^~ src/http/modules/ngx_http_rewrite_module.c:374:18: error: request for member ‘status’ in something not a structure or union 374 | regex->status = NGX_HTTP_MOVED_TEMPORARILY; | ^~ src/http/modules/ngx_http_rewrite_module.c:375:18: error: request for member ‘redirect’ in something not a structure or union 375 | regex->redirect = 1; | ^~ src/http/modules/ngx_http_rewrite_module.c:379:18: error: request for member ‘status’ in something not a structure or union 379 | regex->status = NGX_HTTP_MOVED_PERMANENTLY; | ^~ src/http/modules/ngx_http_rewrite_module.c:380:18: error: request for member ‘redirect’ in something not a structure or union 380 | regex->redirect = 1; | ^~ src/http/modules/ngx_http_rewrite_module.c:394:24: error: request for member ‘lengths’ in something not a structure or union 394 | sc.lengths = ®ex->lengths; | ^~ src/http/modules/ngx_http_rewrite_module.c:399:29: error: request for member ‘redirect’ in something not a structure or union 399 | sc.compile_args = !regex->redirect; | ^~ src/http/modules/ngx_http_rewrite_module.c:407:10: error: request for member ‘size’ in something not a structure or union 407 | regex->size = sc.size; | ^~ src/http/modules/ngx_http_rewrite_module.c:408:10: error: request for member ‘args’ in something not a structure or union 408 | regex->args = sc.args; | ^~ src/http/modules/ngx_http_rewrite_module.c:411:14: error: request for member ‘lengths’ in something not a structure or union 411 | regex->lengths = NULL; | ^~ src/http/modules/ngx_http_rewrite_module.c:415:46: error: ‘ngx_http_script_regex_end_code_t’ undeclared (first use in this function); did you mean ‘ngx_http_script_return_code_t’? 415 | sizeof(ngx_http_script_regex_end_code_t), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ngx_http_script_return_code_t src/http/modules/ngx_http_rewrite_module.c:421:14: error: request for member ‘code’ in something not a structure or union 421 | regex_end->code = ngx_http_script_regex_end_code; | ^~ src/http/modules/ngx_http_rewrite_module.c:421:23: error: ‘ngx_http_script_regex_end_code’ undeclared (first use in this function); did you mean ‘ngx_http_script_return_code’? 421 | regex_end->code = ngx_http_script_regex_end_code; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ngx_http_script_return_code src/http/modules/ngx_http_rewrite_module.c:422:14: error: request for member ‘uri’ in something not a structure or union 422 | regex_end->uri = regex->uri; | ^~ src/http/modules/ngx_http_rewrite_module.c:422:27: error: request for member ‘uri’ in something not a structure or union 422 | regex_end->uri = regex->uri; | ^~ src/http/modules/ngx_http_rewrite_module.c:423:14: error: request for member ‘args’ in something not a structure or union 423 | regex_end->args = regex->args; | ^~ src/http/modules/ngx_http_rewrite_module.c:423:28: error: request for member ‘args’ in something not a structure or union 423 | regex_end->args = regex->args; | ^~ src/http/modules/ngx_http_rewrite_module.c:424:14: error: request for member ‘add_args’ in something not a structure or union 424 | regex_end->add_args = regex->add_args; | ^~ src/http/modules/ngx_http_rewrite_module.c:424:32: error: request for member ‘add_args’ in something not a structure or union 424 | regex_end->add_args = regex->add_args; | ^~ src/http/modules/ngx_http_rewrite_module.c:425:14: error: request for member ‘redirect’ in something not a structure or union 425 | regex_end->redirect = regex->redirect; | ^~ src/http/modules/ngx_http_rewrite_module.c:425:32: error: request for member ‘redirect’ in something not a structure or union 425 | regex_end->redirect = regex->redirect; | ^~ src/http/modules/ngx_http_rewrite_module.c:436:10: error: request for member ‘next’ in something not a structure or union 436 | regex->next = (u_char *) lcf->codes->elts + lcf->codes->nelts | ^~ src/http/modules/ngx_http_rewrite_module.c: In function ‘ngx_http_rewrite_if_condition’: src/http/modules/ngx_http_rewrite_module.c:658:5: error: unknown type name ‘ngx_http_script_regex_code_t’; did you mean ‘ngx_http_script_file_code_t’? 658 | ngx_http_script_regex_code_t *regex; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ngx_http_script_file_code_t src/http/modules/ngx_http_rewrite_module.c:756:49: error: ‘ngx_http_script_regex_code_t’ undeclared (first use in this function); did you mean ‘ngx_http_script_file_code_t’? 756 | sizeof(ngx_http_script_regex_code_t)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ngx_http_script_file_code_t src/http/modules/ngx_http_rewrite_module.c:770:18: error: request for member ‘regex’ in something not a structure or union 770 | regex->regex = ngx_http_regex_compile(cf, &rc); | ^~ src/http/modules/ngx_http_rewrite_module.c:771:22: error: request for member ‘regex’ in something not a structure or union 771 | if (regex->regex == NULL) { | ^~ src/http/modules/ngx_http_rewrite_module.c:775:18: error: request for member ‘code’ in something not a structure or union 775 | regex->code = ngx_http_script_regex_start_code; | ^~ src/http/modules/ngx_http_rewrite_module.c:775:27: error: ‘ngx_http_script_regex_start_code’ undeclared (first use in this function); did you mean ‘ngx_http_script_start_code’? 775 | regex->code = ngx_http_script_regex_start_code; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ngx_http_script_start_code src/http/modules/ngx_http_rewrite_module.c:776:18: error: request for member ‘next’ in something not a structure or union 776 | regex->next = sizeof(ngx_http_script_regex_code_t); | ^~ src/http/modules/ngx_http_rewrite_module.c:777:18: error: request for member ‘test’ in something not a structure or union 777 | regex->test = 1; | ^~ src/http/modules/ngx_http_rewrite_module.c:779:22: error: request for member ‘negative_test’ in something not a structure or union 779 | regex->negative_test = 1; | ^~ src/http/modules/ngx_http_rewrite_module.c:781:18: error: request for member ‘name’ in something not a structure or union 781 | regex->name = value[last]; | ^~ After having a look in the code the below 2 structures causing this are defined in teh directives with PCRE only and not with PCRE2 #if (NGX_PCRE) typedef struct { ngx_http_script_code_pt code; ngx_http_regex_t *regex; ngx_array_t *lengths; uintptr_t size; uintptr_t status; uintptr_t next; unsigned test:1; unsigned negative_test:1; unsigned uri:1; unsigned args:1; /* add the r->args to the new arguments */ unsigned add_args:1; unsigned redirect:1; unsigned break_cycle:1; ngx_str_t name; } ngx_http_script_regex_code_t; typedef struct { ngx_http_script_code_pt code; unsigned uri:1; unsigned args:1; /* add the r->args to the new arguments */ unsigned add_args:1; unsigned redirect:1; } ngx_http_script_regex_end_code_t; #endif Could you please let me know if this is the right way of compiling or niginx1.24 does not support PCRE2 library on Ubuntu.... |
|||
#2598 | duplicate | ngx_http_limit_req_module documentation should specify rate_limit work on millisecond basis | ||
Description |
While trying to use rate limiting on NGINX, I was a bit lost because I specified I wanted a 6000r/m rate limit, but a client doing 154 request would have been rejected (I was in dry mode, so no harm). I did setup burst=100 because, I though burst was some more extra on the 6000 request. I found the solution thanks to a stack overflow post (stackoverflow.com/a/70989063/2886726) citing the nginx blog post
This information about millisecond granularity and the fact that rate limiting is directly transformed in a temporality at a single request level is essential and should be part of the reference documentation. In my case, I can in fact set burst=6000 to only limit at minute granularity. It is important because, other rate limiting implementation may use other techniques, like leaky buckets which does not lead to same type of configuration. |
|||
#2596 | invalid | client_body_buffer_size is ignored within location context | ||
Description |
Hi. I've tested on 1.22.1 and 1.24.0 versions and on both client_body_buffer_size is ignored within location context while client_max_body_size works correctly. location /images/upload { try_files $uri $uri/ /index.php?$args; client_body_buffer_size 32M; client_max_body_size 64M; } If I set it outside in server context it works but that's not a valid solution for me. client_body_buffer_size 32M; location /images/upload { try_files $uri $uri/ /index.php?$args; client_max_body_size 64M; } |