Re: default nginx rewrite with regexp

2014-11-17 Thread Yoann Moulin
Hi, >> I'm working on a default server_name that match everything but www.domain.tld >> then rewrite to www.domain.tld. > > It sounds like you may have better luck letting other server{} blocks use > expected server_name:s; and just let the default match everything else. > > But I'm not exactly

Re: Disable keep_alive based on specific useragent

2014-11-17 Thread Robert Mueller
Hi Thanks for your responses. Unfortunately, they don't seem to work. > and then use the evil IF: > > if ($ios_ua) { keepalive_timout 0; } This doesn't appear to work. if ($http_user_agent ~ "^iOS/8\.") { keepalive_timeout 0; } nginx: [emerg] "keepalive_timeout" directive is not allowed here

[ANN] Windows nginx 1.7.8.1 Gryphon

2014-11-17 Thread itpp2012
21:38 17-11-2014 nginx 1.7.8.1 Gryphon Based on nginx 1.7.8 (17-11-2014, last changeset 5904:abb466a57a22) with; + Naxsi WAF v0.53-3 (upgraded 15-11-2014) + https://github.com/nginx/nginx/pull/7 has been added to code base changeset 5900:20d966ad5e89 + Updated Install_nginx_php_services.zip on s

Re: SPDY inflate errors in nginx 1.7.4 - 1.7.7

2014-11-17 Thread tunist
ok great, thanks for assisting Posted at Nginx Forum: http://forum.nginx.org/read.php?2,254523,254864#msg-254864 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: default nginx rewrite with regexp

2014-11-17 Thread Francis Daly
On Mon, Nov 17, 2014 at 02:22:48PM +0100, Yoann Moulin wrote: Hi there, > I'm working on a default server_name that match everything but www.domain.tld > then rewrite to www.domain.tld. It sounds like you may have better luck letting other server{} blocks use expected server_name:s; and just let

Re: SPDY inflate errors in nginx 1.7.4 - 1.7.7

2014-11-17 Thread Valentin V. Bartenev
On Thursday 06 November 2014 19:17:18 tunist wrote: > ok, so i opened the log using glogg and have pasted a relevant sequence into > pastebin here: > http://pastebin.com/wTQs6ALb > > any tips welcome, thanks > The problem was fixed: http://hg.nginx.org/nginx/rev/abb466a57a22 Thank you for the r

Re: What is the best way to reallocate memory for char array?

2014-11-17 Thread Maxim Dounin
Hello! On Mon, Nov 17, 2014 at 09:35:18AM -0500, kay wrote: > Thanks. > > Is it necessary to use ngx_pfree(str) at the end of my function? As long as you allocate memory from a pool, it's not required to free the memory explicitly via ngx_pfree(). Memory will be freed automatically on the po

Re: What is the best way to reallocate memory for char array?

2014-11-17 Thread kay
Thanks. Is it necessary to use ngx_pfree(str) at the end of my function? Maxim Dounin Wrote: --- > Hello! > > On Mon, Nov 17, 2014 at 09:09:34AM -0500, kay wrote: > > > For example I've allocated memory for char *str: > > > > str = ngx_pnallo

Re: What is the best way to reallocate memory for char array?

2014-11-17 Thread Maxim Dounin
Hello! On Mon, Nov 17, 2014 at 09:09:34AM -0500, kay wrote: > For example I've allocated memory for char *str: > > str = ngx_pnalloc(r->pool, len1); > > Then I've added some data to "str": > > ngx_sprintf(str, "abc"); > > How should I reallocate this memory? Should I use: > > str = ngx_pnall

Re: What is the best way to reallocate memory for char array?

2014-11-17 Thread kay
P.S. len2 > len1 Posted at Nginx Forum: http://forum.nginx.org/read.php?2,254851,254852#msg-254852 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

What is the best way to reallocate memory for char array?

2014-11-17 Thread kay
For example I've allocated memory for char *str: str = ngx_pnalloc(r->pool, len1); Then I've added some data to "str": ngx_sprintf(str, "abc"); How should I reallocate this memory? Should I use: str = ngx_pnalloc(r->pool, len2); ? And I would like to keep the str's "abc" data as well. Posted

default nginx rewrite with regexp

2014-11-17 Thread Yoann Moulin
Hello, I'm working on a default server_name that match everything but www.domain.tld then rewrite to www.domain.tld. I use nginx 1.2.1-2.2+wheezy3 with a big regexp. I have an issu with tld that contain a dot (co.uk co.au net.au, etc...). I must be able to make a difference between domain.co.uk