Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cookie cache
 
 
Перечитал свой пост и понял что не совсем понятно что я понимаю под 
кешированием.
Я пытаюсь кешировать страницу используя следующий код:
server {
    listen       80;
    server_name  my.server.ru;
    
    set $root   /home/server/domains/my.server.ru/public_html;
    root        $root;
    location / {
        index   index.php index.html index.htm;
    }
    location ~ \.php$ {
        fastcgi_pass   unix:/var/run/php-fpm/server.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $root$fastcgi_script_name;
        fastcgi_param  DOCUMENT_ROOT    $root;
        include        fastcgi_params;
        fastcgi_cache wholepage;
        fastcgi_cache_valid 200 301 302 304 5m;
        fastcgi_cache_key 
"$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri|$cookie_skin_lang|$cookie_mnm_key";
        fastcgi_hide_header "Set-Cookie";
        fastcgi_ignore_headers "Cache-Control" "Expires";
    }
    
    location ~ /\.ht {
        deny  all;
    }
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?21,61818,61824#msg-61824
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
 
 |