can't get cache controle to set an expire date

Mahalingam Mr lists at ruby-forum.com
Fri Sep 16 09:49:34 UTC 2011


#   location /images/ {
#       # serve from disk and set expires
#       expires max;
#   }
#
#   location /stylesheets/ {
#       expires max;
#   }
#
#   location /javascripts/ {
#       expires max;
#   }


Solution:

Try this instead of giving the folders explicitly.,

location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
       expires max;
       break;
    }

TML

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list