如果文件带有中文名无法缓存
(不过我主要缓存图片 带有中文名称的的图片地址如果在网页上面加载可以正常缓存 如果在浏览器单独打开者不能)
其实就是如果你浏览/y/妖精的尾巴/323话_1363360995/05.png 不能缓存
/y/%E5%A6%96%E7%B2%BE%E7%9A%84%E5%B0%BE%E5%B7%B4/323%E8%AF%9D_1363360995/05.png
确可以
现在的问题是缓存下来的中文是乱码
原结构
/y/妖精的尾巴/323话_1363360995/
变成
/y/濡栫簿鐨勫熬宸?/323璇漘1363360995/
还好浏览器可以访问,希望有会的帮解决写乱码问题
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http
{ include mime.types;
#default_type application/octet-stream;
default_type application/vnd.android.package-archive;
server_names_hash_bucket_size 128;
client_header_buffer_size 2k;
large_client_header_buffers 4 4k;
client_max_body_size 8m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
open_file_cache max=204800 inactive=20s;
open_file_cache_min_uses 1;
open_file_cache_valid 30s;
tcp_nodelay on;
client_body_buffer_size 512k;
proxy_connect_timeout 5;
proxy_read_timeout 60;
proxy_send_timeout 5;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
gzip on;
gzip_proxied expired no-cache no-store private auth;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 3;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
server {
listen 80;
server_name 192.168.1.1;
location /{
root /usr/local/nginx/conf/;
error_page 404 = @
fetch;
}
location @
fetch {
proxy_pass
http://xxx.com;
proxy_store on;
proxy_store_access user:rw group:rw all:r;
proxy_temp_path /usr/local/nginx/conf/;
root /usr/local/nginx/conf/;
}
}
}