How to add expiry header in NGINX?

November 26, 2013 3.6k views
Tried to add this one- location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires 30d; log_not_found off; } But it didn't worked,that stopped the server. Any solution?
2 Answers
Are there any errors in the error log file?
sudo tail /var/log/nginx/error.log
Have another answer? Share your knowledge.