+
+ # Strip asset tags
+ location ~ ^/(images|javascripts|openlayers|stylesheets|user/image)/ {
+ # Strip asset tags
+ rewrite ^/(.*)/[0-9]+$ /$1;
+
+ # Set expiry to the maximum - the asset tag will change
+ # when there is a new version
+ expires max;
+
+ # Only cache OpenLayers for seven days though
+ if ($uri ~ ^/openlayers/) {
+ expires 7d;
+ }
+ }
+
+ # Cache the embedded map page for seven days
+ location ~ ^/export/embed.html$ {
+ expires 7d;
+ }
+
+ # Include fastcgi configuration
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param REQUEST_URI $uri;
+