自建nginx 图片服务器,安装image_filter 模块

server {
listen 80;
server_name img.imwinlion.com;
index index.html index.htm index.php;
root /alidata/mnt/imwinlion;
location ~ .*\.(php|php5)?$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ (.*)\.(gif|jpg|jpeg|png|PNG|JPG|JPEG)\!(\d+)x(\d+)$
{
try_files $1.$2 /empty last;
image_filter_interlace on;
image_filter_jpeg_quality 90;
image_filter resize $3 $4;
image_filter_buffer 3M;
}
location ~ .*\.(gif|jpg|JPG|PNG|GIF|BMP|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
access_log /dev/null;
}