Francis Daly
May 17, 2018 03:16AM
On Thu, May 17, 2018 at 12:50:10AM -0400, c0nw0nk wrote:

Hi there,

> Thank you for the response and useful information Francis incredibly
> helpful.

You're welcome.

> My webapp outputting the X-Accel-Expires header is PHP like so.
>
> CODE:
> <?php
> echo(gmdate('D, d M Y H:i:s', 0) . ' GMT');
> ?>
> OUTPUT:
> Thu, 01 Jan 1970 00:00:00 GMT
>
> The 0 would be replaced by the time function what is a UNIX time stamp.

A unix time stamp is "absolute time in seconds since Epoch".

That is: it is a single number, probably 10 digits long for anything
currently useful.

Right now, it is:

$ date +%s
1526540978

So if you want to set the expiry time of "in about an hour", you could
send a header of

X-Accel-Expires: @1526544000

where that timestamp corresponds to

$ date -u -d @1526544000
Thu May 17 08:00:00 UTC 2018

The X-Accel-Expires header should have a single value: either digits,
or an @ followed by digits.

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx Cache | @ prefix example

c0nw0nk May 12, 2018 12:05AM

Re: Nginx Cache | @ prefix example

Francis Daly May 16, 2018 06:44PM

Re: Nginx Cache | @ prefix example

c0nw0nk May 17, 2018 12:50AM

Re: Nginx Cache | @ prefix example

Francis Daly May 17, 2018 03:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 159
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