Welcome! Log In Create A New Profile

Advanced

Re: alias vs root with re location

Maxim Dounin
August 13, 2010 08:56AM
Hello!

On Fri, Aug 13, 2010 at 04:45:16PM +0400, Maxim Dounin wrote:

[...]

> > если в конфиге
> >
> > location ~* ^/(upload|files) {
> > autoindex on;
> > expires max;
> > alias /opt/gptour/web-app-stat/gptour/upload;
>
> - alias /opt/gptour/web-app-stat/gptour/upload;
> + alias /opt/gptour/web-app-stat/gptour/upload$uri;

А, нет, вру, надо ещё из $uri начальную часть выкинуть. Т.е. вот
так:

location ~* ^/(?:upload|files)(.*) {
autoindex on;
expires max;
alias /opt/gptour/web-app-stat/gptour/upload$1;
}

> Или, что лучше, используйте статические location'ы. Регулярные
> выражения в данном случае нафиг не нужны.

Ну и это остаётся в силе.

Maxim Dounin

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

alias vs root with re location

Vasil Mikhalenya August 13, 2010 06:20AM

Re: alias vs root with re location

Sergey Shepelev August 13, 2010 06:40AM

Re: alias vs root with re location

Vasil Mikhalenya August 13, 2010 08:06AM

Re: alias vs root with re location

Sergey Shepelev August 13, 2010 08:28AM

Re: alias vs root with re location

Лазовский Вадим August 13, 2010 08:38AM

Re: alias vs root with re location

Vasil Mikhalenya August 13, 2010 08:44AM

Re: alias vs root with re location

Maxim Dounin August 13, 2010 08:46AM

Re: alias vs root with re location

Vasil Mikhalenya August 13, 2010 08:52AM

Re: alias vs root with re location

Maxim Dounin August 13, 2010 08:56AM

Re: alias vs root with re location

Vladimir Sopot August 13, 2010 05:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 96
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