How to disable fastcgi caching for the logged user?

Francis Daly francis at
Sun Aug 6 09:48:57 UTC 2017

On Sat, Aug 05, 2017 at 03:24:28PM -0400, Etienne Robillard wrote:

Hi there,

> The $http_pragma is not properly defined in

It's the one after "$http2" and before "$https".

> Is that a custom variable or is defined in nginx?

$http_anything is defined in nginx if the incoming request has a header
that maps to "anything".

> I was hoping of doing something like:
> fastcgi_no_cache $http_pragma $remote_user;
> What do you think?

The documentation at describes what
that directive should do.

You want to disable fastcgi caching when the fastcgi variable REMOTE_USER
is set.

Your config presumably includes something like "fastcgi_param REMOTE_USER

In that case, you want "fastcgi_no_cache $something".

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list