Reputation: 917
I'm trying to add expiry headers for a 3.2 apps on nginx 1.2.4, compiled with default support for headers module.
My rule inside the server {} block is:
location /assets/ {
access_log off;
expires 30d;
}
I tried other reg exp based on file name extension that I found online, but all seem to do not work. What am I doing wrong?
Reponse headers is:
Accept-Ranges bytes
Age 0
Cache-Control proxy-revalidate
Connection Keep-Alive
Content-Type text/css
Date Fri, 02 Nov 2012 03:58:45 GMT
Last-Modified Fri, 02 Nov 2012 01:08:09 GMT
Via 1.1 BC5-ACLD
Upvotes: 1
Views: 1011
Reputation: 917
Yes I finally found out that the rule I had initially was working perfectly. My internet provider is doing some smarts around content coming from non national sites (I live in New Zealand), so the headers were changed by some of their proxies. All good, I was very confused, cause I used these rule heaps of times, and never had troubles; it's the first time that I have the server in another country here in nz, so never experienced this issue.
Upvotes: 1
Reputation: 87516
Make sure you put that config file in the right place. Make sure you restart nginx.
Upvotes: 0