alias vs root with re location

Vasil Mikhalenya bazilek на gmail.com
Пт Авг 13 14:18:37 MSD 2010


Привет всем,

заметил странности в поведении дерективы 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
----------- следущая часть -----------
Вложение в формате HTML было извлечено&hellip;
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20100813/b2afa351/attachment.html>


Подробная информация о списке рассылки nginx-ru