imagecache
imagecache copied to clipboard
Please add Nginx config notes in README
I had a problem on my live Nginx server - cache routes gave me 404.
The issue appears when you have static resources caching enabled for media files. F.e. this config in nginx.conf file will lead to conflict with your module:
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|webp|woff|woff2)$ {
expires max;
access_log off;
add_header Cache-Control "public";
}
You have to change this to exclude your {route} directory:
# where "cache" is {route}
location ~* ^\/(?!cache).*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|webp|woff|woff2)$ {
expires max;
access_log off;
add_header Cache-Control "public";
}
I have opened PR for this - https://github.com/Intervention/imagecache/pull/122