Welcome! Log In Create A New Profile

Advanced

Re: following symlinks

April 01, 2009 03:06AM
On Tue, Mar 31, 2009 at 03:38:40PM -0400, jackdempsey 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?

What you want to do if the file does not exist ? If serving by fastcgi, then

location / {
error_page 404 = @fastcgi;
}

location @fastcgi {
fastcgi_pass ...
}


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

following symlinks

jackdempsey March 31, 2009 03:38PM

Re: following symlinks

mike March 31, 2009 04:08PM

Re: following symlinks

mike March 31, 2009 04:08PM

Re: following symlinks

Igor Sysoev April 01, 2009 01:32AM

Re: following symlinks

Igor Sysoev April 01, 2009 03:06AM

Re: following symlinks

jackdempsey April 01, 2009 10:57AM

Re: following symlinks

Igor Sysoev April 01, 2009 11:07AM

Re: following symlinks

mike April 01, 2009 01:04PM

Re: following symlinks

Igor Sysoev April 01, 2009 01:03PM

Re: following symlinks

mike April 01, 2009 01:13PM

Re: following symlinks

Igor Sysoev April 01, 2009 03:54PM

Re: following symlinks

jackdempsey April 03, 2009 10:33AM

Re: following symlinks

jackdempsey April 03, 2009 11:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready