Weird connections spike

Jeff Waugh jdub at
Mon Aug 31 17:54:18 MSD 2009

<quote who="Igor Sysoev">

> However, you try this:
>    location / {
>        root       /srv;
>        try_files  /$uri
>                   /$uri/
>                   /wordpress/root/$uri
>                   /wordpress/root/$uri/
>                   /index.php?q=$request_uri;
>    }
> The reason why try_files tests files only against "root" is because
> there is also "alias" that can be not expressed via simple concatenation.

Hmm. This appears to make a ridiculous amount of sense. ;-)

Is it impossible to provide a fully qualified path to try_files? I can't do
something like:

  root  /srv/;
  try_files /srv/$uri

Will that check for /srv/$uri ?

How about $document_root in try_files?

  root  /srv/;
  set  $wordpress_root  /srv/wordpress/root;
    $document_root$uri $document_root$uri/
    $wordpress_root$uri $wordpress_root$uri/

(I'll test the patch you posted regardless of these questions.)


- Jeff

-- 2010: Wellington, NZ      
  "A 'lame' server is a server that is SUPPOSED to be authoritative, but,
      when asked, says: 'Me? I know nothing, I'm from Madrid!'" - Ralf

More information about the nginx mailing list