map to use regex or not

2017-05-31 Thread Reinis Rozitis
Hello, I have a setup where I need to override backend's content type and was wondering which approach (without too much digging into source and/or doing microbenchmarks) is better (less cpu) from performance point of view? map $uri $custom_content_type { hostnames; *.jpg "image/jpeg"; }

Re: Upstream module usage to process data

2017-05-31 Thread isolomka
So my design seems to be wrong. Thanks a lot for assistance. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274486,274548#msg-274548 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Upstream module usage to process data

2017-05-31 Thread Maxim Dounin
Hello! On Wed, May 31, 2017 at 09:00:42AM -0400, isolomka wrote: > So I have my own module which is working with thread pool enabled. > ngx_http_upstream_init is called from my thread_event_handler, flag r->aio > is enabled. > In fact, upstream is not initialized at all. > > When i set aio flag

Re: Upstream module usage to process data

2017-05-31 Thread isolomka
So I have my own module which is working with thread pool enabled. ngx_http_upstream_init is called from my thread_event_handler, flag r->aio is enabled. In fact, upstream is not initialized at all. When i set aio flag to false and call to ngx_http_upstream_init, i'm getting a core dump in ngx_ep

Re: Upstream module usage to process data

2017-05-31 Thread Maxim Dounin
Hello! On Wed, May 31, 2017 at 08:22:07AM -0400, isolomka wrote: > Does upstream works correctly with thread pool enabled? Yes, it does. > I see some strange validation in ngx_http_upstream_init_request() > if (r->aio) { > return; > } > that flag is set when thread pool is enabl

Re: Upstream module usage to process data

2017-05-31 Thread isolomka
Thanks for the answers. Does upstream works correctly with thread pool enabled? I see some strange validation in ngx_http_upstream_init_request() if (r->aio) { return; } that flag is set when thread pool is enabled. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274486

Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

2017-05-31 Thread iivan
I updated nginx to version 1.13.0 This rule that was working correctly right now makes me mistake in the browser: ERR_TOO_MANY_REDIRECTS if ($host ~* ^(.*)\.website\.com$) { set $sub_domain $1; rewrite ^/(.*)?$ /index.cfm?event=dashboard&lista=$sub_domain&nuovoURL=$1 last; } T