Welcome! Log In Create A New Profile

Advanced

Re: Nginx 0.8.52 + fastcgi + joomla + кеширование fastcgi запросов

Maxim Dounin
October 04, 2010 08:36AM
Hello!

On Mon, Oct 04, 2010 at 08:02:04AM -0400, drdim wrote:

> После обновления nginx c 0.7 ветки на 0.8
> столкнулся, что nginx перестал кешировать
> запросы от бэкенда.
>
> location ~* ^.+\.(php)$ {
>
> root /usr/local/www/;
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;
>
> fastcgi_pass_header 'Set-Cookie';

В 0.8.44+ ответы с Set-Cookie по умолчанию не кешируются, а равно
Set-Cookie в ответах не прячется.

Т.е. fastcgi_pass_header можно убрать, а если надо чтобы такие
ответы кешировались - нужно добавить Set-Cookiet в
fastcgi_ignore_headers.

> fastcgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment;
> fastcgi_cache_bypass $http_pragma $http_authorization;
> fastcgi_ignore_headers 'Cache-Control' 'Expires';
> fastcgi_cache_key
> "$server_addr:$server_port$request_uri|$cookie_phpsessid";
> fastcgi_cache www_cache;
> fastcgi_temp_path /tmp/nginx/temp1 1 2;
> fastcgi_cache_use_stale updating error timeout invalid_header http_500;
> fastcgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment;
> fastcgi_cache_bypass $http_pragma $http_authorization;
> fastcgi_cache_valid 1s;
> expires 1s;
> }
>
> Кто сможет помочь, или сталкивались ли
> с этой проблемой?

Maxim Dounin

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Nginx 0.8.52 + fastcgi + joomla + кеширование fastcgi запросов

drdim October 04, 2010 08:02AM

Re: Nginx 0.8.52 + fastcgi + joomla + кеширование fastcgi запросов

Maxim Dounin October 04, 2010 08:36AM

Re: Nginx 0.8.52 + fastcgi + joomla + кеширование fastcgi запросов

drdim October 04, 2010 08:58AM

Re: Nginx 0.8.52 + fastcgi + joomla + кеширование fastcgi запросов

Maxim Dounin October 04, 2010 09:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready