Skip to content

Commit

Permalink
added 'root' directive in static location.
Browse files Browse the repository at this point in the history
  • Loading branch information
forodon authored and anandology committed Jan 5, 2011
1 parent 11eb54c commit 2efc19b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cookbook/fastcgi-nginx.md
Expand Up @@ -51,11 +51,12 @@ Older versions may work, but aren't tested.

To serve static files add this:

location /static/ {
if (-f $request_filename) {
rewrite ^/static/(.*)$ /static/$1 break;
}
}
location /static/ {
root /path/to/www;
if (-f $request_filename) {
rewrite ^/static/(.*)$ /static/$1 break;
}
}

__Note:__ the address and port may be different.

Expand Down

0 comments on commit 2efc19b

Please sign in to comment.