Welcome! Log In Create A New Profile

Advanced

how to configure the expires header if my static file is served by resin?

Chen Bangzhong
November 24, 2011 12:06AM
Hello, all

I use nginx as a reverse proxy and all traffic goes to resin. The
css/js files are also hosted on resin.

Now I want to add the expires directives to css/js, is the following
configuration correct?

location ~ .*\.(css|js)$
{
include proxy_params;
proxy_pass http://back_end;
#access_log off;
expires 6h;
}

location / {
include proxy_params;
proxy_pass http://back_end;
}

thanks.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

how to configure the expires header if my static file is served by resin?

Chen Bangzhong November 24, 2011 12:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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