following symlinks

Igor Sysoev is at rambler-co.ru
Wed Apr 1 09:32:42 MSD 2009


On Tue, Mar 31, 2009 at 01:08:19PM -0700, Michael Shadle wrote:

> have you tried -d ?
> 
> a bit redundant as -e i think is the same as -f and -d ... but worth a shot

-e tests file/directory/symlink existance.

> also include which version you're running so Igor knows.
> 
> On Tue, Mar 31, 2009 at 12:38 PM, jackdempsey <nginx-forum at nginx.us> wrote:
> > Hi all,
> >
> > I'm trying to serve up some static files that I've linked to via a symlink. The -f check is failing:
> >
> > # check if the file exists and serve it
> >    if (-f $request_filename) {
> >      access_log        off;
> >     expires           1d;
> >     break;
> >   }
> >
> > as its obviously not a file. I saw something that suggested using -e instead for symlinks, but that doesn't seem to work for me either (this is version 0.6.32 fwiw). Anyone have any suggestions on what I can do to have symlink'ed files served up?


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list