Re: nginx rewrites $request_method on error

2014-05-13 Thread kay
Yichun Zhang (agentzh) Wrote: --- > Hello! > > On Wed, May 7, 2014 at 8:59 PM, kay wrote: > >> 1. It is not recommended to use the rewrite_by_lua directive > directly > > > > You can do the same with access_by_lua > > > > Please do not cut my or

Re: Return JSON for 404 error instead of html

2014-05-13 Thread B.R.
Many thanks to both of you! Another step in deeper understanding on how to use nginx. :o) --- *B. R.* On Tue, May 13, 2014 at 10:13 PM, Francis Daly wrote: > On Tue, May 13, 2014 at 09:15:16PM +0200, B.R. wrote: > > I understand the logic, but when using that handler through error_page > 404 >

Re: subs filter error

2014-05-13 Thread Francis Daly
On Fri, May 09, 2014 at 01:36:48PM +0100, Tom McLoughlin wrote: Hi there, > subs filter header ignored, this may be a compressed response. while > My configuration is available at, > http://p.ngx.cc/d7eacc9934caa82a There appears to be no configuration there. If it matters to the question, cou

Re: Return JSON for 404 error instead of html

2014-05-13 Thread Francis Daly
On Tue, May 13, 2014 at 09:15:16PM +0200, B.R. wrote: > I understand the logic, but when using that handler through error_page 404 > @404, won't the handler's 200 status overload the original 404 one? http://nginx.org/r/error_page indicates that it won't unless "=" is used. f -- Francis

Re: Return JSON for 404 error instead of html

2014-05-13 Thread B.R.
I understand the logic, but when using that handler through error_page 404 @404, won't the handler's 200 status overload the original 404 one? --- *B. R.* On Tue, May 13, 2014 at 4:37 PM, Valentin V. Bartenev wrote: > On Tuesday 13 May 2014 15:30:56 B.R. wrote: > > > Instead of using 3rd-party

Re: Return JSON for 404 error instead of html

2014-05-13 Thread Justin Dorfman
application/octet-stream it is =p Regards, Justin Dorfman Director of Developer Relations MaxCDN Email / IM: jdorf...@maxcdn.com Mobile: 818.485.1458 Twitter: @jdorfman On Tue, May 13, 20

Re: Return JSON for 404 error instead of html

2014-05-13 Thread Valentin V. Bartenev
On Tuesday 13 May 2014 08:48:50 Justin Dorfman wrote: > Out of curiosity, would the mime/content type show up as application/json > or text/plain? > It depends on the default_type directive: http://nginx.org/r/default_type wbr, Valentin V. Bartenev

Re: Return JSON for 404 error instead of html

2014-05-13 Thread Justin Dorfman
Out of curiosity, would the mime/content type show up as application/json or text/plain? Regards, Justin Dorfman Director of Developer Relations MaxCDN Email / IM: jdorf...@maxcdn.com Mobile: 818.485.1458 Twitter: @jdorfman

Re: Return JSON for 404 error instead of html

2014-05-13 Thread Valentin V. Bartenev
On Tuesday 13 May 2014 15:30:56 B.R. wrote: > > Instead of using 3rd-party echo module, you can utilize the return > > directive > > > > for the same purpose: > > return 200 '{"status": "Not Found"}'; > > > > Reference: http://nginx.org/r/return > > > > wbr, Valentin V. Bartenev > > ​I woul

Re: Dropped https client connection doesn't drop backend proxy_pass connection

2014-05-13 Thread Peter B.
Ubuntu 12.04 + Nginx 1.4.7 I'm not 100% sure this is the same issue, but the symptoms are the same. Nginx as SSL termination to an eventsource backend upstream. Nginx active connections continuously go up until a restart. I just upgraded to 1.6.0 to see if it resolves the issue. Thanks for you

Re: Strange advisory

2014-05-13 Thread B.R.
Thanks to both of you for precisions about your point of view. Having thought more about it, it seems indeed strane to *interpret* log file content to *execute* script snippet in order to change window title or alike, following the link Kurt provided. It seems that old-fahion habits have taken adv

Re: Return JSON for 404 error instead of html

2014-05-13 Thread B.R.
> > Instead of using 3rd-party echo module, you can utilize the return > directive > for the same purpose: > > return 200 '{"status": "Not Found"}'; > > Reference: http://nginx.org/r/return > > wbr, Valentin V. Bartenev > ​I would have intuitively written code 404 rather than 200 on this one s

Re: fastcgi cache path keys zone=name:size

2014-05-13 Thread beatnut
This is what I wanted to know. Thank you very much Maxim. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,250046,250047#msg-250047 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: fastcgi cache path keys zone=name:size

2014-05-13 Thread Maxim Dounin
Hello! On Tue, May 13, 2014 at 04:48:56AM -0400, beatnut wrote: > I found similar information about : > > limit_req_zone $binary_remote_addr zone=one:1m "One megabyte zone can > keep about 16 thousand 64-byte states. " > > or > > ssl_session_cache shared:SSL:1m; " The cache size is specif

Re: Return JSON for 404 error instead of html

2014-05-13 Thread Valentin V. Bartenev
On Monday 12 May 2014 23:42:03 Lord Nynex wrote: > Justink101, > > Using the echo module > > error_page 404 @404; > location @404 { echo '{"status": "Not Found"}'; } > [..] Instead of using 3rd-party echo module, you can utilize the return directive for the same purpose: return 200 '{"status

Re: fastcgi cache path keys zone=name:size

2014-05-13 Thread beatnut
I found similar information about : limit_req_zone $binary_remote_addr zone=one:1m "One megabyte zone can keep about 16 thousand 64-byte states. " or ssl_session_cache shared:SSL:1m; " The cache size is specified in bytes; one megabyte can store about 4000 sessions." but there is no info a

Re: Return JSON for 404 error instead of html

2014-05-13 Thread Matthias Rieber
On Mon, 12 May 2014, Lord Nynex wrote: Justink101, Using the echo module error_page 404 @404; location @404 { echo '{"status": "Not Found"}'; } if your using proxy_pass, don't forget: proxy_intercept_errors on; Matthias ___ nginx mailing list ng

Re: Re: Compile nginx 1.4.7 --with-http_rewrite_module Error

2014-05-13 Thread gaop...@richinfo.cn
Think you The problem has been resolved.Because 'if($remote_addr' , 'If' and '(' a space is required between gaop...@richinfo.cn From: Valentin V. Bartenev Date: 2014-05-13 15:15 To: nginx Subject: Re: Compile nginx 1.4.7 --with-http_rewrite_module Error On Tuesday 13 May 2014 13:34:11

Re: Strange advisory

2014-05-13 Thread Valentin V. Bartenev
On Sunday 11 May 2014 06:25:53 B.R. wrote: [..] > What is the benefit of having those unescaped control characters in a log > file? Escaping them allows you to warn about their presence safely... and > that is directly exploitable by anything, once again safely. The benefit is that you can easily

Re: Dropped https client connection doesn't drop backend proxy_pass connection

2014-05-13 Thread Valentin V. Bartenev
On Tuesday 13 May 2014 00:46:37 Peter B. wrote: > We're affected by this issue as well. Is there an open ticket where we > can track progress at http://trac.nginx.org/? What version of nginx and what operating system do you use? Nginx 1.5.5+ has been able to reliably detect close of connection on

Re: Re: Compile nginx 1.4.7 --with-http_rewrite_module Error

2014-05-13 Thread gaop...@richinfo.cn
ngx_http_rewrite_module syntax:if (condition) { ... } default:— context:server, location I use in location', gaop...@richinfo.cn From: Valentin V. Bartenev Date: 2014-05-13 15:15 To: nginx Subject: Re: Compile nginx 1.4.7 --with-http_rewrite_module Error On Tuesday 13 May 2014 13:34:11 ga

Re: Compile nginx 1.4.7 --with-http_rewrite_module Error

2014-05-13 Thread Valentin V. Bartenev
On Tuesday 13 May 2014 13:34:11 gaop...@richinfo.cn wrote: > Think you > But If I turn off the words,I have no way is to use 'if' order.An error > occurred : [emerg] 14499#0: unknown directive "if($remote_addr" in > /usr/local/nginx1/conf/nginx.conf:46 There is no directive "if($remote_addr"