##

    location ~ group[1-3]/M00/(.+)_([0-9]+)x([0-9]+)\.(jpg|gif|png) {           #这段往下为生成缩略图的配置
        root /opt/fastdfs_storage_data/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;
        }

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

        image_filter resize $w $h;

        image_filter_buffer 2M;

        try_files group[1-3]/M00$1.$4 $1.jpg;
  }

##
location ~/group[1-3]/M00{
root /opt/fastdfs_storage_data/data;
ngx_fastdfs_module;
}

作者:Jeebiz  创建时间:2020-06-19 17:52
 更新时间:2024-10-26 16:27