Re: nginx 1.4.2 [error] 2516#12636: CreateFile()

2014-05-06 Thread itpp2012
sam.gu Wrote: --- > root cache; > "D:/myapp/nginx-1.4.2/cache/myapp/static/msgengine/msgengine.js" root = nginx base + root value, so it looks for your app where you told it to look. Posted at Nginx Forum: http://forum.nginx.org/

Re: nginx rewrites $request_method on error

2014-05-06 Thread kay
Sure, you can use nginx.conf from my previous message and this server config: server { listen 80; rewrite_by_lua ' local res = ngx.location.capture("/memc?cmd=get&key=test") ngx.say(res.body) '; location / { root /etc/nginx/www; } location /memc { internal;

using $upstream* variables inside map directive

2014-05-06 Thread Kirill K.
Hello, I'm trying to avoid caching of small responses from upstreams using map: map $upstream_http_content_length $dontcache { default 0; ~^\d\d$ 1; ~^\d$ 1; } Unfortunatelly, nginx seems to ignore $upstream* variables at the map processing stage, hence variables like $upstream_http_content_length

nginx 1.4.2 [error] 2516#12636: CreateFile()

2014-05-06 Thread sam.gu
i added the cache configuration in my nginx.conf ,like this : location ~ .*\.(js|css|ico|jpg|jpeg|png|gif)$ { expires 7d; root cache; proxy_store on; } But i coudlen't login my app ,the error log is : 2014/05/07 09

Re: nginx rewrites $request_method on error

2014-05-06 Thread Yichun Zhang (agentzh)
Hello! On Tue, May 6, 2014 at 2:58 AM, kay wrote: > Actually I suppose that this is a bug, as it is not possible to make filter > by $request_method > > Also some external modules like > https://github.com/openresty/memc-nginx-module have strange behavior when > client passes TRACE and nginx gets

Re: How to limit POST request per ip ?

2014-05-06 Thread Jeroen Ooms
On Sat, Apr 5, 2014 at 3:07 PM, Maxim Dounin wrote: > > we need something like > > limit_req_zone $limit zone=one:10m rate=1r/s; > > where the $limit variables is empty for non-POST requests (as we > don't want to limit them), and evaluates to $binary_remote_addr > for POST requests. A follow

Re: misunderstood regex location

2014-05-06 Thread dcaillibaud
this sentence is not so clear... > I understand > that all first level are evaluated to see if one branch need to be > explored deeper, but it's not so obvious. ...I mean : I understand that all first level selectors are compared to see which block need to be evaluated deeper, but it's not so o

Re: misunderstood regex location

2014-05-06 Thread dcaillibaud
> > 2) (I guess E but I'm not so sure), this can also be a pitfall > example (how > > complicating things can lead to unexpected behaviour) > > > > location /images/ { > > location ~* \.(gif|jpg|jpeg)$ { > > [ configuration D ] > > } > > } > > > > location ~* \.(gif|jpg|jpeg)$ { > >

Re: misunderstood regex location

2014-05-06 Thread B.R.
On Tue, May 6, 2014 at 5:03 PM, dcaillibaud wrote: > I understand my mistake, thanks to both of you. > > May I suggest to insist on this in > http://nginx.org/en/docs/http/ngx_http_core_module.html#location, with a > remark on the fact that ^~ is not usable with a regex, for example with > > synt

Re: misunderstood regex location

2014-05-06 Thread dcaillibaud
I understand my mistake, thanks to both of you. May I suggest to insist on this in http://nginx.org/en/docs/http/ngx_http_core_module.html#location, with a remark on the fact that ^~ is not usable with a regex, for example with syntax: location [ = | ^~ ] uri { ... } location ~ | ~* reg

Re: Nginx 1.6 under load gives a ton of error 403

2014-05-06 Thread dfumagalli
Thank you so much. I am pretty sure the 403 comes from another source as well (as it does not happen under light http server load) but the 'love' regex was really a good show of having a nice hawk eye from yours :D Posted at Nginx Forum: http://forum.nginx.org/read.php?2,249857,249866#msg-249866

Re: Nginx 1.6 under load gives a ton of error 403

2014-05-06 Thread Richard Stanway
Your config is returning a 403 from any referrer containing "love" any you have such URLs on your own site according to your log excerpt. I would not recommend such referrer matching, it's unlikely to help in any case. On Tue, May 6, 2014 at 12:30 PM, dfumagalli wrote: > This is also what I tho

Re: Nginx 1.6 under load gives a ton of error 403

2014-05-06 Thread dfumagalli
This is also what I thought. I have searched the whole nginx etc directory for 403 and deny /etc/nginx# grep -r '403' . and the results I got are these snippets: # Deny bad Referers if ($http_referer ~* (babes|forsale|girl|jewelry|love|nudit|organic|poker|porn|sex|teen)) {

Re: nginx rewrites $request_method on error

2014-05-06 Thread kay
Actually I suppose that this is a bug, as it is not possible to make filter by $request_method Also some external modules like https://github.com/openresty/memc-nginx-module have strange behavior when client passes TRACE and nginx gets GET. Posted at Nginx Forum: http://forum.nginx.org/read.php?

Re: Nginx 1.6 under load gives a ton of error 403

2014-05-06 Thread Richard Stanway
It is probably your application / backend that is generating the 403, it's unlikely nginx is responsible for this. I guess rate / connection limiting with a custom error code may cause this, but you should know if you configured this. Please show us your config and describe your backend in more det

X-forward-for question

2014-05-06 Thread Larry
Hello, I plan to set up two servers for a training purpose : one frontend, one database. I created a tcp server but I need to be sure of the idea : Be F the frontend and B the backend. when a client will make a request, it will hit F first (nginx + https involved) then will ask B to process the

Re: Nginx 1.6 under load gives a ton of error 403

2014-05-06 Thread dfumagalli
Domain anonymized sample error log: see the first entry returns 200, the next 403 on the same page. 2.139.79.51 - - [06/May/2014:08:13:23 +] "GET /flowers/love HTTP/1.1" 200 62 55 "http://dev.domain.com/flowers/friendship"; "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:28.0) Gecko/20100101 Firefox/2

Nginx 1.6 under load gives a ton of error 403

2014-05-06 Thread dfumagalli
Hello, we have used Nginx 1.4.x (the "extras", full featured package) for a year with no major troubles. Only some relatively rare error 403 we can't find the source of, it only happens when our XEN VPS (Ubuntu 12.04 LTS) is under (other sharing customers) load and our website is itself under high