Re: Странное поведение try_files
Vadim Lazovskiy
vadim.lazovskiy at gmail.com
Wed Mar 13 09:38:42 UTC 2013
- try_files $image_path =404;
+ alias /disks/links/v-links/$image_path;
так заработало.
Просто для общего развития, не могли бы пояснить, что было не так?
2013/3/13 Vadim Lazovskiy <vadim.lazovskiy at gmail.com>
> Прошу прощения, здравствуйте забыл :)
>
>
> 2013/3/13 Vadim Lazovskiy <vadim.lazovskiy at gmail.com>
>
>> Конфиг:
>>
>> location /images/ {
>> alias /disks/links/v-links/;
>> error_page 404 /notfound.jpg;
>>
>> location ~ ^/images/thumbs/(?<image_path>.*)$ {
>> try_files $image_path =404;
>>
>> image_filter resize $resize_width -;
>> }
>> }
>>
>> Версия:
>>
>> # /usr/local/nginx/sbin/nginx -V
>> nginx version: nginx/1.2.7
>> built by gcc 4.6.2 (SUSE Linux)
>> TLS SNI support enabled
>> configure arguments: --prefix=/usr/local/nginx
>> --error-log-path=/var/log/nginx/error_log
>> --http-log-path=/var/log/nginx/access_log
>> --http-client-body-temp-path=/var/nginx/client_body_temp
>> --http-fastcgi-temp-path=/var/nginx/fastcgi_temp
>> --pid-path=/var/run/nginx.pid --user=wwwrun --group=www
>> --with-http_stub_status_module --with-cc-opt='-O3 -march=native
>> -mtune=native' --with-http_ssl_module --with-http_dav_module
>> --with-http_image_filter_module
>> --add-module=../masterzen-nginx-upload-progress-module-82b35fc
>> --add-module=../nginx_upload_module-2.2.0 --with-debug
>>
>> Результат:
>>
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 test location: "images/"
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 test location: ~
>> "^/images/thumbs/(?<image_path>.*)$"
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 http regex set $image_path to
>> "Ходячие Мертвецы (The Walking Dead)/Ходячие Мертвецы (The Walking
>> Dead).jpg"
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 using configuration
>> "^/images/thumbs/(?<image_path>.*)$"
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 http cl:-1 max:4294967296
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 rewrite phase: 2
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 rewrite phase: 3
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 post rewrite phase: 4
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 generic phase: 5
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 generic phase: 6
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 access phase: 7
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 access phase: 8
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 post access phase: 9
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 try files phase: 10
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 http script var: "Ходячие
>> Мертвецы (The Walking Dead)/Ходячие Мертвецы (The Walking Dead).jpg"
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 trying to use file: "Ходячие
>> Мертвецы (The Walking Dead)/Ходячие Мертвецы (The Walking Dead).jpg"
>> "/disks/links/v-links/Ходячие Мертвецы (The Walking Dead)/Ходячие Мертвецы
>> (The Walking Dead).jpg"
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 try file uri: "Ходячие
>> Мертвецы (The Walking Dead)/Ходячие Мертвецы (The Walking Dead).jpg"
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 content phase: 11
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 content phase: 12
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 content phase: 13
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 content phase: 14
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 http filename:
>> "/disks/links/v-links/Мертвецы (The Walking Dead)/Ходячие Мертвецы (The
>> Walking Dead).jpg"
>> 2013/03/13 13:04:15 [debug] 21424#0: *19130 add cleanup: 000000000077C558
>> 2013/03/13 13:04:15 [error] 21424#0: *19130 open()
>> "/disks/links/v-links/Мертвецы (The Walking Dead)/Ходячие Мертвецы (The
>> Walking Dead).jpg" failed (2: No such file or directory), client:
>> 10.0.43.213, server: fs2.karelia.pro, request: "GET
>> /images/thumbs/%E8%CF%C4%D1%DE%C9%C5%20%ED%C5%D2%D4%D7%C5%C3%D9%20%28The%20Walking%20Dead%29/%E8%CF%C4%D1%DE%C9%C5%20%ED%C5%D2%D4%D7%C5%C3%D9%20%28The%20Walking%20Dead%29.jpg?width=200
>> HTTP/1.1", host: "fs2.example.com"
>>
>> Вопрос такой, куда делось слово "Ходячие"?
>>
>> И как узнать что происходило в контент-фазах 11-14?
>>
>> Спасибо.
>>
>> --
>> Best Regards,
>> Vadim Lazovskiy
>>
>
>
>
> --
> Best Regards,
> Vadim Lazovskiy
>
--
Best Regards,
Vadim Lazovskiy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20130313/45f01683/attachment.html>
Подробная информация о списке рассылки nginx-ru