On Sat, Dec 13, 2014 at 4:25 PM, Valentin V. Bartenev <[email protected]> wrote: > > On Saturday 13 December 2014 15:53:32 neubyr wrote: > [..] > > Thank you for pointing out debugging log. I think that helped in > explaining > > this behavior. > > > > It seems like nginx is adding slash as uri name matches with > corresponding > > directory and not file name. I thought nginx will return 404 in this > case, > > but it adds trailing slash when matching directory is found. > > > > After adding trailing slash uri becomes /test/ and hence it matches next > > location block. > > > > Hope my understanding of debugging log is correct. Let me know if I am > > missing anything. > [..] > > From the debug log it looks like that you have the try_files directive > in your "/test" location block. And the config you have mentioned before > isn't the one you are actually using. > > wbr, Valentin V. Bartenev > > > Thanks for pointing it out. It's giving same result even without try_files directive in '/test' location block.
2014/12/14 07:33:09 [debug] 16414#0: epoll: fd:6 ev:0001 d:00007F1B949F4010 2014/12/14 07:33:09 [debug] 16414#0: accept on 0.0.0.0:80, ready: 0 2014/12/14 07:33:09 [debug] 16414#0: posix_memalign: 00007F1B965F9440:256 @16 2014/12/14 07:33:09 [debug] 16414#0: *2 accept: 50.136.134.241 fd:3 2014/12/14 07:33:09 [debug] 16414#0: posix_memalign: 00007F1B96614070:256 @16 2014/12/14 07:33:09 [debug] 16414#0: *2 event timer add: 3: 60000:1418542449679 2014/12/14 07:33:09 [debug] 16414#0: *2 reusable connection: 1 2014/12/14 07:33:09 [debug] 16414#0: *2 epoll add event: fd:3 op:1 ev:80002001 2014/12/14 07:33:09 [debug] 16414#0: timer delta: 112608 2014/12/14 07:33:09 [debug] 16414#0: posted events 0000000000000000 2014/12/14 07:33:09 [debug] 16414#0: worker cycle 2014/12/14 07:33:09 [debug] 16414#0: epoll timer: 60000 2014/12/14 07:33:09 [debug] 16414#0: epoll: fd:3 ev:0001 d:00007F1B949F41C1 2014/12/14 07:33:09 [debug] 16414#0: *2 http wait request handler 2014/12/14 07:33:09 [debug] 16414#0: *2 malloc: 00007F1B96588C90:1024 2014/12/14 07:33:09 [debug] 16414#0: *2 recv: fd:3 77 of 1024 2014/12/14 07:33:09 [debug] 16414#0: *2 reusable connection: 0 2014/12/14 07:33:09 [debug] 16414#0: *2 posix_memalign: 00007F1B965D3EE0:4096 @16 2014/12/14 07:33:09 [debug] 16414#0: *2 http process request line 2014/12/14 07:33:09 [debug] 16414#0: *2 http request line: "GET /test HTTP/1.1" 2014/12/14 07:33:09 [debug] 16414#0: *2 http uri: "/test" 2014/12/14 07:33:09 [debug] 16414#0: *2 http args: "" 2014/12/14 07:33:09 [debug] 16414#0: *2 http exten: "" 2014/12/14 07:33:09 [debug] 16414#0: *2 http process request header line 2014/12/14 07:33:09 [debug] 16414#0: *2 http header: "User-Agent: curl/7.30.0" 2014/12/14 07:33:09 [debug] 16414#0: *2 http header: "Host: example.org" 2014/12/14 07:33:09 [debug] 16414#0: *2 http header: "Accept: */*" 2014/12/14 07:33:09 [debug] 16414#0: *2 http header done 2014/12/14 07:33:09 [debug] 16414#0: *2 event timer del: 3: 1418542449679 2014/12/14 07:33:09 [debug] 16414#0: *2 generic phase: 0 2014/12/14 07:33:09 [debug] 16414#0: *2 rewrite phase: 1 2014/12/14 07:33:09 [debug] 16414#0: *2 test location: "/50x.html" 2014/12/14 07:33:09 [debug] 16414#0: *2 test location: "/test" 2014/12/14 07:33:09 [debug] 16414#0: *2 using configuration "/test" 2014/12/14 07:33:09 [debug] 16414#0: *2 http cl:-1 max:1048576 2014/12/14 07:33:09 [debug] 16414#0: *2 rewrite phase: 3 2014/12/14 07:33:09 [debug] 16414#0: *2 post rewrite phase: 4 2014/12/14 07:33:09 [debug] 16414#0: *2 generic phase: 5 2014/12/14 07:33:09 [debug] 16414#0: *2 generic phase: 6 2014/12/14 07:33:09 [debug] 16414#0: *2 generic phase: 7 2014/12/14 07:33:09 [debug] 16414#0: *2 generic phase: 8 2014/12/14 07:33:09 [debug] 16414#0: *2 access phase: 9 2014/12/14 07:33:09 [debug] 16414#0: *2 access phase: 10 2014/12/14 07:33:09 [debug] 16414#0: *2 post access phase: 11 2014/12/14 07:33:09 [debug] 16414#0: *2 try files phase: 12 2014/12/14 07:33:09 [debug] 16414#0: *2 content phase: 13 2014/12/14 07:33:09 [debug] 16414#0: *2 content phase: 14 2014/12/14 07:33:09 [debug] 16414#0: *2 content phase: 15 2014/12/14 07:33:09 [debug] 16414#0: *2 content phase: 16 2014/12/14 07:33:09 [debug] 16414#0: *2 content phase: 17 2014/12/14 07:33:09 [debug] 16414#0: *2 content phase: 18 2014/12/14 07:33:09 [debug] 16414#0: *2 http filename: "/usr/share/nginx/test/test" 2014/12/14 07:33:09 [debug] 16414#0: *2 add cleanup: 00007F1B965D4E98 2014/12/14 07:33:09 [debug] 16414#0: *2 http static fd: -1 2014/12/14 07:33:09 [debug] 16414#0: *2 http dir 2014/12/14 07:33:09 [debug] 16414#0: *2 posix_memalign: 00007F1B96595200:4096 @16 2014/12/14 07:33:09 [debug] 16414#0: *2 http finalize request: 301, "/test?" a:1, c:1 2014/12/14 07:33:09 [debug] 16414#0: *2 http special response: 301, "/test?" 2014/12/14 07:33:09 [debug] 16414#0: *2 http set discard body 2014/12/14 07:33:09 [debug] 16414#0: *2 xslt filter header 2014/12/14 07:33:09 [debug] 16414#0: *2 HTTP/1.1 301 Moved Permanently Server: nginx/1.6.2 Date: Sun, 14 Dec 2014 07:33:09 GMT Content-Type: text/html Content-Length: 184 Location: http://example.org/test/ Connection: keep-alive 2014/12/14 07:33:09 [debug] 16414#0: *2 write new buf t:1 f:0 00007F1B965952A0, pos 00007F1B965952A0, size: 196 file: 0, size: 0 2014/12/14 07:33:09 [debug] 16414#0: *2 http write filter: l:0 f:0 s:196 2014/12/14 07:33:09 [debug] 16414#0: *2 http output filter "/test?" 2014/12/14 07:33:09 [debug] 16414#0: *2 http copy filter: "/test?" 2014/12/14 07:33:09 [debug] 16414#0: *2 image filter 2014/12/14 07:33:09 [debug] 16414#0: *2 xslt filter body - N
_______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
