自建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;
}

 

相关文章:

  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2021-11-10
猜你喜欢
  • 2021-08-07
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
相关资源
相似解决方案