Welcome! Log In Create A New Profile

Advanced

Re: Possible bug with -f test

June 10, 2010 03:16PM
On Thu, Jun 10, 2010 at 02:55:26PM -0400, bkirkbri wrote:

> Igor Sysoev Wrote:
> -------------------------------------------------------
> > The bug is in "alias/if" combination. "root"
> > should work:
> >
> > location ~ \.html$ {
> > root /tmp;
> > ...
> >
> >
> > --
> > Igor Sysoev
> > http://sysoev.ru/en/
> >
>
> Cool, it does work with "root" instead of "alias". I had tried that, but wasn't sure if it was a safe alternative because of the warning from Dave Cheney on this page:
>
> http://serverfault.com/questions/23157/setting-expires-headers-for-static-content-served-from-nginx

"root" is good and safe directive. It works with all these "if"s.

"alias" is more generic than "root": you can always describe "root" mapping
via "alias":

location /dir/ {
root /path/to;
}

is the same as

location /dir/ {
alias /path/to/dir/;
}

But not opposite, for example, you can not describe this

location /dir1/ {
alias /path/to/dir2/;
}

using "root". I use "root" always if it's possible.


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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Possible bug with -f test

bkirkbri June 10, 2010 01:56PM

Re: Possible bug with -f test

Igor Sysoev June 10, 2010 02:36PM

Re: Possible bug with -f test

bkirkbri June 10, 2010 02:55PM

Re: Possible bug with -f test

Igor Sysoev June 10, 2010 03:16PM

Re: Possible bug with -f test

bkirkbri June 10, 2010 05:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 312
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready