ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Странное поведение try_files


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: Странное поведение try_files
  • From: Vadim Lazovskiy <vadim.lazovskiy@xxxxxxxxx>
  • Date: Wed, 13 Mar 2013 13:38:42 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=1/J85LU5TA+5yP9twR58Ybh4YHpUnZt/nxxWYnDzOIY=; b=aeVo9QvGdnaMsVKYOwfoTV95WeiNZevFrDCUo2/w2Nx5dziDo6qQaqrQshn7KzthqP 6PCN8swXSRom4EritgUJHK2hy0QdI4P9O+twE44pjkuEMoXT8rfIZR37Fb83KCkW37v5 GFa9BXUmIqBj9OwlXgkGtY1YgYHxM1Q2Vj6QBrz7cXLzNSFcgw1MtcqcjUh2vQc1OHo6 vld3qf/FNrvYxvg6zWHPO3bN8bUm3XRt0NP4jc379tNd4Y47DszbPCfNAaVIxMXVC1sG CsXi2N2QdQGxBFgccE7gScFPfvl1rL+D5yGz+ebFnGxIdJLBLT7mKQjnTAU+I2LzcDb7 gr3Q==
  • In-reply-to: <CAL-L5YBemx5M5XBncUaN-qCf9vya-4S=Gb26OLZM6f93u=RH2A@mail.gmail.com>
  • References: <CAL-L5YD6a7Qwc9x+0p_QhwzrB-pvKT0syVoYEz37Np+bCmSdhQ@mail.gmail.com> <CAL-L5YBemx5M5XBncUaN-qCf9vya-4S=Gb26OLZM6f93u=RH2A@mail.gmail.com>

- try_files $image_path =404;
alias /disks/links/v-links/$image_path;

так заработало.

Просто для общего развития, не могли бы пояснить, что было не так?


2013/3/13 Vadim Lazovskiy <vadim.lazovskiy@xxxxxxxxx>
Прошу прощения, здравствуйте забыл :)


2013/3/13 Vadim Lazovskiy <vadim.lazovskiy@xxxxxxxxx>
Конфиг:

                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
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.