Почему-то не срабатывает запрет каширования статики в определенном локейшене...

Vladislav Prodan universite at ukr.net
Mon Dec 3 11:23:02 UTC 2012


Конфиг:

location /media/avatar/ {
        expires -1;
        add_header Last-Modified $sent_http_Expires;
}

Запрос с сервера:

> GET /media/avatar/super/6.jpg HTTP/1.1
> User-Agent: curl/7.24.0 (amd64-portbld-freebsd9.0) libcurl/7.24.0 OpenSSL/0.9.8q zlib/1.2.5
> Host: XXX.YYYYY.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.2.4
< Date: Mon, 03 Dec 2012 11:17:40 GMT
< Content-Type: image/jpeg
< Content-Length: 4089
< Last-Modified: Mon, 03 Dec 2012 10:58:42 GMT
< Connection: close
< Expires: Thu, 31 Dec 2037 23:55:55 GMT
< Cache-Control: max-age=315360000
< Accept-Ranges: bytes
<


# nginx -V
nginx version: nginx/1.2.4
TLS SNI support enabled
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt='-I /usr/local/include' --with-ld-opt='-L /usr/local/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx-error.log --user=www --group=www --with-file-aio --with-ipv6 --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-scgi-temp-path=/var/tmp/nginx/scgi_temp --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp --http-log-path=/var/log/nginx-access.log --with-http_flv_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_secure_link_module --with-http_stub_status_module --with-http_sub_module --with-pcre --add-module=/usr/ports/www/nginx/work/passenger-3.0.17/ext/nginx --add-module=/usr/ports/www/nginx/work/arut-nginx-rtmp-module-f1eeb39 --with-http_ssl_module




-- 
Vladislav V. Prodan            
System & Network Administrator 
http://support.od.ua           
+380 67 4584408, +380 99 4060508
VVP88-RIPE



Подробная информация о списке рассылки nginx-ru