Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: If rewrite
Исправил,работает.
http {
include mime.types;
default_type application/octet-stream;
proxy_cache_path /var/spool/nginx/ levels=1:2 keys_zone=one:2048m;
proxy_cache_min_uses 1;
server {
listen 80;
server_name
access_log /var/log/nginx/img.access.log main;
location ~* ^.(css|js)$ {
proxy_pass http://127.0.0.1;
proxy_store on;
proxy_temp_path /var/spool/nginx;
proxy_set_header Host mydomain;
proxy_set_header If-Modified-Since "";
expires 1d;
add_header Last-Modified: $date_gmt;
add_header Cache-Control: public;
try_files $uri $uri/;
if (-f $request_filename) {
break;
}
}
location ~* ^.+small+(jpeg|jpg|png|gif)$ {
proxy_pass http://127.0.0.1;
proxy_store on;
proxy_temp_path /var/spool/nginx;
proxy_set_header Host mydomain;
proxy_set_header If-Modified-Since "";
expires 1d;
add_header Last-Modified: $date_gmt;
add_header Cache-Control: public;
try_files $uri $uri/;
if (-f $request_filename) {
break;
}
}
Почему не работает кэширование статики?В /var/spool/nginx ничего нет.Не могу
разобраться как должно работать кэширование файлов nginx'om.
Posted at Nginx Forum: http://forum.nginx.org/read.php?21,89982,90448#msg-90448
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|