Почему-то не приходит в ответе HTTP срок действия статических ресурсов, а именно на файлы ".gif" и ".jpg".
".png" отрабатывает:
Cache-Control:max-age=604800
Cache-Control:public
Connection:keep-alive
Date:Thu, 13 Aug 2015 11:04:55 GMT
ETag:"55c8b874-1cd0"
Expires:Thu, 20 Aug 2015 11:04:55 GMT
Last-Modified:Mon, 10 Aug 2015 14:43:00 GMT
Pragma:public
Server:nginx/1.4.6 (Ubuntu)
Может что-то в конфиге nginx не так:
server {
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \/\.ht {
deny all;
}
location ~* ^\/(classes|errors\/logs|sys\-temp|cache|xmldb|static|packages) {
deny all;
}
location ~* (\/for_del_connector\.php|\.ini|\.conf)$ {
deny all;
}
location ~* ^(\/files\/|\/images\/) {
try_files $uri =404;
}
location ~* ^\/images\/autothumbs\/ {
try_files $uri @autothumbs =404;
}
location @autothumbs {
rewrite ^\/images\/autothumbs\/(.*)$ /autothumbs.php?img=$1$query_string last;
}
location @clean_url {
rewrite ^/(.*)$ /index.php?path=$1 last;
}
location @dynamic {
try_files $uri @clean_url;
}
location / {
rewrite ^\/robots\.txt /sbots.php?path=$1 last;
rewrite ^\/sitemap\.xml /sitemap.php last;
rewrite ^\/\~\/([0-9]+)$ /tinyurl.php?id=$1 last;
rewrite ^\/(udata|upage|uobject|ufs|usel|ulang|utype|umess|uhttp):?(\/\/)?(.*)? /releaseStreams.php?scheme=$1&path=$3 last;
rewrite ^\/(.*)\.xml$ /index.php?xmlMode=force&path=$1 last;
rewrite ^(.*)\.json$ /index.php?jsonMode=force&path=$1 last;
if ($cookie_umicms_session) {
error_page 412 = @dynamic;
return 412;
}
if ($request_method = 'POST') {
error_page 412 = @dynamic;
return 412;
}
}
location ~* \.js$ {
rewrite ^\/(udata|upage|uobject|ufs|usel|ulang|utype|umess|uhttp):?(\/\/)?(.*)? /releaseStreams.php?scheme=$1&path=$3 last;
try_files $uri =404;
}
location ~* \.(ico|jpg|jpeg|png|gif|swf|css)$ {
access_log off;
expires 7d;
add_header Pragma public;
add_header Cache-Control "public";
try_files $uri =404;
}
}
CMS: UMI.