Welcome! Log In Create A New Profile

Advanced

Re: following symlinks

April 01, 2009 10:57AM
Thanks Igor, Mike. I've tried the -e flag, and it doesn't seem to follow the symlinks correctly:

# check if the file exists and serve it
if (-e $request_filename) {
access_log off;
expires 1d;
break;
}

# check for an index file, and serve that
if (-e $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}

# rails page caching
if (-e $request_filename.html) {
rewrite (.*) $1.html break;
}

# route traffic to site cluster
if (!-e $request_filename) {
proxy_pass http://site-here;
break;
}

When I make the link a hardlink, it does work correctly (with just the -f flag). The -e test should work on 0.6.32, right? Is there anything else I might need to do, any option, compile flag, etc? I can't imagine so, but I'm pretty confident given my local tests that its not working. Anyone have a config with -e working on symbolic links? Maybe its worth putting together a demo site/config myself and seeing if it would work for others. Thanks again for the help.



Edited 1 time(s). Last edit at 04/01/2009 10:58AM by jackdempsey.
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: 137
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