Forum: NGINX debugging - location directives

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8072fdc83f765ae5075f252cb4d4d111?d=identicon&s=25 Chris Cortese (Guest)
on 2009-05-09 21:28
(Received via mailing list)
This is basically a followup to my last post but I have some general
questions now.

I determined that in my config (and this seems to be Windoze only
because my Ubuntu version works fine), the location directives I've used
are just not getting hit.

1.  The order of the location directives does not matter--true?  I have
tried changing my order, but no luck.

1.a.  What happens if two location directives are equivalent in terms of
pattern matching?  Then maybe order does matter?  BTW, this is not my
issue but I would like to know.

2.  What's the best way to debug which location directive is being used
for a given request?

3.  Are there any good docs for using the debug feature of logging?
Verbose description of the various log messages?  Maybe this is in the
wiki and I can't find it, or else maybe it could be in the wiki in the
future?


Thanks!
Chris

Once again, here is my config.  In Windoze I can't get any of my static
assets (/images, /css, /js) to load and my motivation for the above
questions.

server {
  listen   *:80;
  server_name  jobsite.xpdesktop;

  access_log  logs/jobsite.access.log;
  error_log  logs/jobsite.error.log;

  root /cygwin/home/Chris/www/live/jobsite/trunk/html/public;
  index index.php index.html;

# serve static files directly
        location ~*
.+\.(jpg|jpeg|gif|css|png|js|ico|pdf|zip|tar|gz|bz|bz2)$ {
             expires 30d;
        }

  location / {
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME
c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public/index.php;
    fastcgi_param QUERY_STRING      q=$request_uri;
    include fastcgi_params;
  }

#  location ~ (jpg|jpeg|gif|png)$ {
#  }



  location ~ /.php$ {
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME
c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public$fastcgi_script_name;
    fastcgi_param QUERY_STRING      q=$request_uri;
    include fastcgi_params;
  }

  location = /css/style.php {
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME
c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public/css/style.php;
    include fastcgi_params;
  }
}
This topic is locked and can not be replied to.