nginx + image_filter + fastdfs - ZKUI

Nothing is impossible

nginx + image_filter + fastdfs

location ~ /group1/M00/(.*)_([0-9]+)x([0-9]+)\.jpg{
root /home/fdfsdata/data;
ngx_fastdfs_module;
set $w $2;
set $h $3;

if ($w != "0") {
rewrite /group1/M00/(.+)_(\d+)x(\d+)\.(jpg|gif|png)$ /group1/M00/$1.$4 break;
}
image_filter resize $w $h;
image_filter_buffer 2M;
}

location /group1/M00{
alias /home/fastdfs/data;
ngx_fastdfs_module;
}

location / {
root html;
index index.html index.htm;
}

分享