Weird connections spike

Jeff Waugh jdub at
Mon Aug 31 12:36:24 MSD 2009

<quote who="Jeff Waugh">

> set  $wordpress_root  /srv/wordpress/root;

Should've mentioned:

root  /srv/;

> location / {
>   try_files  $uri $uri/  @wordroot;
> }
> location @wordroot {
>   internal;
>   root  $wordpress_root;
>   index  index.php;
>   try_files  $uri $uri/  /index.php?q=$request_uri;
>   expires  5y;
> }

The point behind the above logic is to try and serve a file first from the
domain's root (such as favicon.ico), then from the generic $wordpress_root
for files provided by the WordPress distribution (such as everything under
/wp-includes as with the .js example in the debugging), then finally pass
anything else to PHP.


- Jeff

-- 2010: Wellington, NZ      
     "The Irish were next, being the only people who could credibly be
    accused of lowering the tone of a society of convicts." - Guy Rundle

More information about the nginx mailing list