I have the following location directive in my nginx config file:
server{
...
location ~* \.js$ {expires 1d;}
.开发者_C百科..
location / {
...
}
}
I expect a file served by this URL http://www.mydomain.com/javascripts/myfile.js to have an expiration of +1 day, but I am seeing an expiration of +20 years. What am I doing wrong?
It turns out that I was supposed to edit proxy.conf. Once I did that, it worked swimmingly.
精彩评论