Weird 0.8.11.1 connections spike
Igor Sysoev
is at rambler-co.ru
Mon Aug 31 15:28:21 MSD 2009
On Mon, Aug 31, 2009 at 06:36:24PM +1000, Jeff Waugh wrote:
> <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.
The patch.
--
Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
Index: src/http/ngx_http_core_module.c
===================================================================
--- src/http/ngx_http_core_module.c (revision 2385)
+++ src/http/ngx_http_core_module.c (working copy)
@@ -1215,6 +1215,7 @@
(void) ngx_http_internal_redirect(r, &path, &args);
}
+ ngx_http_finalize_request(r, NGX_DONE);
return NGX_OK;
}
More information about the nginx
mailing list