I'm trying to make nginx send expiration headers, I tried in two different ways:
location ~* ^.+\.(ico|css|js|gif|jpe?g|png)\?[0-9]+$ {
expires max;
}
and
location / {
if ($request_uri ~* "\.(ico|css|js|gif|jpe?g|png)\?[0-9]+$") {
expires max;
break;
}
#....
}
none of which worked. No expiration headers are sent whatsoever. Any ideas how to debug this issue?