The best configuration for serving static content

António P. P. Almeida appa at perusio.net
Mon Dec 5 17:22:01 UTC 2011


On 5 Dez 2011 16h33 WET, mdounin at mdounin.ru wrote:

> Hello!
>
> On Mon, Dec 05, 2011 at 04:22:19PM +0000, António P. P. Almeida
> wrote:
>
>> On 5 Dez 2011 10h29 WET, nginx-forum at nginx.us wrote:
>>
>>> location ~ \.(css|js|jpg|jpeg|png|gif)$ {
>>> expires 31536000s;
>> ^^^^^^^^^
>> Why don't you use:
>>
>> expires 1y; 
>>
>> It's easier to understand IMO.
>
> The whole location in question is a nop (it's never matched as 
> previous one will always win), so it doesn't really matter.

Yep. I know. It's just for his information, so that in future he can
use a more legible config style.

--- appa



> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list