server
{
listen 80;
server_name g.zcdn.com;
index index.html; location / {
proxy_cache cache_go;
proxy_temp_path /dev/shm/tmp 1 1 2;
proxy_cache_valid 200 302 8h;
proxy_cache_valid 404 415 1m;
proxy_cache_valid any 10m;
proxy_cache_key $host$uri$is_args$args; proxy_set_header Host $host;
proxy_pass http://localhost:18001;
} location ~* .*_(\d+)x(\d+)_(\d+)\.(JPG|jpg|gif|png|PNG)$ {
set $img_width $1;
set $img_height $2;
set $img_quality $3;
rewrite ^(.*)_\d+x\d+_\d+.(JPG|jpg|gif|png|PNG)$ $1.$2 break;
image_filter resize $img_width $img_height;
image_filter_buffer 10M;
image_filter_jpeg_quality $img_quality; proxy_cache cache_go;
proxy_temp_path /dev/shm/tmp 1 1 2;
proxy_cache_valid 200 302 8h;
proxy_cache_valid 404 415 1m;
proxy_cache_valid any 10m;
proxy_cache_key $host$uri$is_args$args; proxy_pass http://localhost:18001;
#error_page 415 = /empty;
expires 10d;
} location ~* .*_(\d+)x(\d+)_(\d+)a(90|180|270)\.(JPG|jpg|gif|png|PNG)$ {
set $img_width $1;
set $img_height $2;
set $img_quality $3;
set $img_angle $4;
rewrite ^(.*)_\d+x\d+_\d+a\d+\.(JPG|jpg|gif|png|PNG)$ $1.$2 break;
image_filter resize $img_width $img_height;
image_filter rotate $img_angle;
image_filter_buffer 10M;
image_filter_jpeg_quality $img_quality; proxy_cache cache_go;
proxy_temp_path /dev/shm/tmp 1 1 2;
proxy_cache_valid 200 302 8h;
proxy_cache_valid 404 415 1m;
proxy_cache_valid any 10m;
proxy_cache_key $host$uri$is_args$args; proxy_pass http://localhost:18001;
#error_page 415 = /empty;
expires 10d;
} location ~* .*_r(90|180|270)\.(JPG|jpg|gif|png|PNG)$ {
set $angle $1;
rewrite ^(.*)_r(90|180|270)\.(JPG|jpg|gif|png|PNG)$ $1.$3 break;
image_filter rotate $angle;
image_filter_buffer 10M; proxy_cache cache_go;
proxy_temp_path /dev/shm/tmp 1 1 2;
proxy_cache_valid 200 302 8h;
proxy_cache_valid 404 415 1m;
proxy_cache_valid any 10m;
proxy_cache_key $host$uri$is_args$args; proxy_pass http://localhost:18001;
#error_page 415 = /empty;
expires 10d; } access_log /apps/logs/nginx/g.zcdn.com.log log_access;
}

  

最新文章

  1. [转]SQL Server 存储过程 一些常用用法(事物、异常捕捉、循环)
  2. 编译安装的 mysql apache 用 service mysqld start 来启动
  3. 《C++ primer》--第12章
  4. Java多态的体现之接口
  5. WordPress Think Responsive Themes ‘upload_settings_image.php’任意文件上传漏洞
  6. web_reg_find()查询信息为变量
  7. 【转】android去掉EditView的默认焦点问题
  8. 使用 PIVOT 和 UNPIVOT 行转列 列转行 报表统计 函数
  9. ES5 object的新函数
  10. Uber上海公司被司机打上门
  11. [Linked List]Remove Linked List Elements
  12. [译]ASP.NET Core 2.0 部分视图
  13. [网络流]BZOJ4657 最小割约束
  14. python之正则表达式和re模块一
  15. CentOS挂载光盘
  16. Ajax-创建ajax
  17. JS在严格模式和非严格模式的区别
  18. [BZOJ2216]Lightning Conductor
  19. VS2012 Getting Started with Owin and Katana
  20. leetcode 【 Remove Nth Node From End of List 】 python 实现

热门文章

  1. 边缘检测之Sobel检测算子
  2. std::string转化大小写(C++)
  3. 21个值得收藏的Javascript技巧
  4. 超简单TAB切换
  5. Javascript 学习笔记 无缝滚动
  6. Activity篇章参考
  7. 3.19 外协加工(通过BOM体现加工物料总成本,非系统标准工序外协功能)
  8. JAVA代码静态检测之PMD
  9. MFC上下浮动与渐入渐出消息提示框实现
  10. poj2365---求多边形边长总和