Re: Непонятное поведение try_files
    Alexey V. Karagodov 
    kav at karagodov.name
       
    Tue Mar  3 22:05:13 MSK 2009
    
    
  
баг или фича?
имеем
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20090303/6725141d/attachment.html>
    
    
More information about the nginx-ru
mailing list