views:

21

answers:

1

I have the following location directive in my nginx config file:

server{ ... location ~* .js$ {expires 1d;} ... 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?

A: 

It turns out that I was supposed to edit proxy.conf. Once I did that, it worked swimmingly.

Bilal Aslam