debugging - location directives
Chris Cortese
cortese.consulting at gmail.com
Sat May 9 23:22:05 MSD 2009
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;
}
}
More information about the nginx
mailing list