Francis Daly francis at
Sun Jun 11 21:48:05 UTC 2017

On Sun, Jun 11, 2017 at 12:18:14AM +0300, ST wrote:
> On Sat, 2017-06-10 at 07:49 +0100, Francis Daly wrote:
> > On Fri, Jun 09, 2017 at 04:07:31PM +0300, ST wrote:

Hi there,

> > > I try to understand an example configuration and have difficulties with
> > > following line:
> > > 
> > > fastcgi_cache_key "$request_method|$http_if_modified_since|
> > > $http_if_none_match|$host|$request_uri";

> > This particular directive sets the value for the cache key for requests
> > that might otherwise be handled by a fastcgi_pass directive. The cached
> > response will only be sent if these five values from the incoming request
> > are identical.

> Thank you very much for the detailed answer. Now I understand what the
> line meant. However I'm not sure it solves my problem. Actually I was
> trying to translate following two lines from Apache config into nginx,
> however it is probably not related to fastcgi_cache_key, as I have
> initially assumed...

I confess that I do not see how the nginx line above relates to the
apache lines below.

But that's not important now, since there is a new question:

> Here are the two lines:
> RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
> RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
> Do you know what is their equivalent in nginx?

By themselves, I think that the nginx equivalent is "".

According to the apache docs at
these cause two environment variables to be defined with values from
the incoming request headers.

Possibly some other part of the apache config or runtime makes use of
those environment variables; possibly nothing uses them.

If nothing uses them, the lines do not matter and can be removed. If
something uses them, that something needs to be investigated to learn
what it does with them.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list