Weird 0.8.11.1 connections spike

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


<quote who="Jeff Waugh">

> set  $wordpress_root  /srv/wordpress/root;

Should've mentioned:

root  /srv/example.com/root;

> 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.

Thanks,

- Jeff

-- 
linux.conf.au 2010: Wellington, NZ                http://www.lca2010.org.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