ПРОЕКТЫ 


  АРХИВ 


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



баг или фича?

имеем

error_page 403 @ERROR_PAGE_403;

location ~* /\. {
return 403;
}

location / {
try_files /index.html $uri $uri/ @PHP5;
}

location @PHP5 {
 include include/fastcgi_param;
 include include/error;
 include include/error_ERROR_PAGE_404;
 fastcgi_param SCRIPT_FILENAME         $document_root/index.php5;
 fastcgi_pass_request_body off;
 client_body_in_file_only clean;
 fastcgi_pass php5-cluster;
}

location @ERROR_PAGE_403 {
 include include/allow_all;
 root /srv/www/vhosts/service/error;
 try_files /$host/403.html /$host/index.html /403.html /index.html; #да, знаю что неправильно, но работает нормально для случаев, где try_files используется только в этом location
}

при запрос http://gde-to.tam/test/.secret и отсутствии /$host/403.html /$host/index.html /403.html получаем внутренний редирект на @PHP5, а не на index.html

если же сделать так:
- try_files /$host/403.html /$host/index.html /403.html /index.html;
+ try_files /$host/403.html /$host/index.html /403.html /index.html /index.html; # /index.html 2 раза подряд в конце 

то получаем /index.html

P.S.: но в любом случае, при запросе http://gde-to.tam/test/./secret получаем опять @PHP5
я неправильно описал location?



 




Copyright © Lexa Software, 1996-2009.