Absolute rather than relative times in expires directives
Maxim Dounin
mdounin at mdounin.ru
Mon Jan 25 15:04:26 UTC 2016
Hello!
On Sun, Jan 24, 2016 at 02:21:01AM -0500, rgrraj wrote:
> Hi Francis
>
> The same works like a charm in 1.9.6 but not in 1.9.2. The error log shows
> the follow,
>
> "[emerg] 6151#0: "expires" directive invalid value in" respective sites
> enabled file.
>
> And our configuration is just as follows,
> ## in nginx.conf
> map $time_iso8601 $expiresc {
> default "3h";
> ~T22 "@00h00";
> ~T23 "@00h00";
> }
>
> ##in sites enabled file,
> location /path/to/files/ {
> expires $expiresc;
> }
>
>
> doesnt allows to restart nginx and fails with the above error in nginx error
> log.
The message suggests that you are using not 1.9.2, but an older
version without variables support in the expires directive.
Variables support in the expires directive was introduced in nginx
1.7.9, see http://nginx.org/r/expires.
--
Maxim Dounin
http://nginx.org/
More information about the nginx
mailing list