ПРОЕКТЫ 


  АРХИВ 


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]

SSI и мемкеш


  • To: nginx-ru@xxxxxxxxx
  • Subject: SSI и мемкеш
  • From: Aleksandr Sytar <sytar.alex@xxxxxxxxx>
  • Date: Sun, 13 Jun 2010 13:58:19 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=SF7ALHpmWYlNLnu+oOgnK+RFopUs8SjdIQwmNyQqjyU=; b=QlGFZHDU1eIKjiOpO0prWs/C93ifVkKFrn1jVuT+tEMbmZCIspp4rekG87NGobri/w DiT0o+KqXLN/m7ZDigMMI8UdDIOtrDMIlA/Cq5bww0lOWCA3J9r5PSCzVuE0eex8He/R SJfDg6PU2nkNEHdH5t4B7nqeJm8HUUu93PWHw=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=kpiYMuiif6rLDrCpAEAm+6OSDF7y8NuvFog355nLoDwV8TnWBjqXTtaX1jWEvD2kLT aQ1e4UDE2BeIZ04RMYt5PRjQrpsV6mQNzPOA2tXg5/xuxz9u0Ud98v/xOdcFPdGOQAp6 hcix7INgDprypuEOaexoC7Wqm5hP3DhWsOKx0=

Или я чего-то не понимаю или nginx не отрабатывает error_page при SSI-include

server {
        listen 80;
        server_name name;
        
        charset utf-8;
        
        access_log  /var/log/nginx/test.access.log combined;
        access_log  /var/log/nginx/upstream.test.access.log upstream;

        root   /var/www/www;
        
        ssi on;
        
        gzip off;
        
        log_subrequest on;
                
        set     $memcached_key  "$uri";

      location / {
                default_type       text/html;
                memcached_pass  memcached;
                error_page      404 502 504 = @php;     
        }

# Это ssi-include
        location /catalog/get_subcategory_product {
                default_type       text/html;
                memcached_pass  memcached;
                error_page      404 502 504 = @php;
        }

        location @php {
                fastcgi_pass backend;
                include fastcgi_params;
                fastcgi_param  SCRIPT_FILENAME  $document_root/index.php;
                fastcgi_param  PATH_INFO        $uri;
                fastcgi_param  REQUEST_URI      $uri;
        }
}

Результат - при инклюде nginx смотрит в мемкеш, ничего там не находит
и возвращает 404 игнорирую error_page

Пробовал try_files (смотреть в мемкеш через именованный локейшн -
try_files @memcached @php) - nginx всегда берёт данные из @php:

server {
        listen 80;
        server_name name;
        
        charset utf-8;
        
        access_log  /var/log/nginx/test.access.log combined;
        access_log  /var/log/nginx/upstream.test.access.log upstream;

        root   /var/www/www;
        
        ssi on;
        
        gzip off;
        
        log_subrequest on;
                
        set     $memcached_key  "$uri";

      location / {
                try_files @memcached @php;
        }
      location @memcached {
               default_type       text/html;
                memcached_pass  memcached;
                error_page      404 502 504 = @php;     
      }

#ssi-include берётся по правилам /

        location @php {
                fastcgi_pass backend;
                include fastcgi_params;
                fastcgi_param  SCRIPT_FILENAME  $document_root/index.php;
                fastcgi_param  PATH_INFO        $uri;
                fastcgi_param  REQUEST_URI      $uri;
        }
}

Как быть?
-- 
Have a nice day

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.