Welcome! Log In Create A New Profile

Advanced

alias vs root with re location

Vasil Mikhalenya
August 13, 2010 06:20AM
Привет всем,

заметил странности в поведении дерективы alias, а точнее необъяснимое
поведение

2010/08/13 12:05:03 [error] 28688#0: *89 opendir()
"/opt/gptour/web-app-stat/gptour/*uploa*" failed (2: No such file or
directory), client: ipaddress, server: blabla.com, request: "GET /upload/
HTTP/1.0", host: "blabla.com"

в конфиге

location ~* ^/upload {
autoindex on;
expires max;
alias /opt/gptour/web-app-stat/gptour/upload;

Соответсвенно отдается 404.

Заметил это, когда хотел несколько алььтернатив в регулярке добавить в один
location.
директива root работает нормально, но тогда нужно несколько одинаковых
location.

Еще пример:

==> /var/log/nginx/error.log <==
2010/08/13 12:09:55 [error] 29076#0: *148
"/opt/gptour/web-app-stat/gptour/upload*0* <-- тут перенос строки в логе
*Hostindex.html*" is not found (2: No such file or directory), client:

если в конфиге

location ~* ^/(upload|files) {
autoindex on;
expires max;
alias /opt/gptour/web-app-stat/gptour/upload;

nginx version: nginx/0.8.47
built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
TLS SNI support enabled
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid
--lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--with-http_stub_status_module --with-http_ssl_module
--with-http_gzip_static_module --with-http_perl_module



Спасибо за внимание, объясните где я промахнулся.


--
Best regards,
Vasil Mikhalenya
_______________________________________________
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: 270
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