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

  

nginx filter的更多相关文章

  1. Nginx开发从入门到精通 学习目录分享学习 (阿里著作)

    Nginx开发从入门到精通   缘起 nginx由于出色的性能,在世界范围内受到了越来越多人的关注,在淘宝内部它更是被广泛的使用,众多的开发以及运维同学都迫切的想要了解nginx模块的开发以及它的内部 ...

  2. ELK采集之nginx 之高德地图出城市IP分布图

    1.采用拓扑: 角色扮演: Agent:采用logstash,IP:192.168.10.7 Redis队列: IP:192.168.10.100 Indexer:logstash,IP:192.16 ...

  3. Logstash收集nginx日志之使用grok过滤插件解析日志

    grok作为一个logstash的过滤插件,支持根据模式解析文本日志行,拆成字段. nginx日志的配置: log_format main '$remote_addr - $remote_user [ ...

  4. elk安装配置

    ELK介绍   官网https://www.elastic.co/cn/ 中文指南https://www.gitbook.com/book/chenryn/elk-stack-guide-cn/det ...

  5. Fail2ban 阻止暴力破解

    简介: Fail2ban 能够监控系统日志,匹配日志中的错误信息(使用正则表达式),执行相应的屏蔽动作(支持多种,一般为调用 iptables ),是一款很实用.强大的软件. 如:攻击者不断尝试穷举 ...

  6. docker search

    命令:docker search [root@iZ943kh74qgZ ~]# docker search --help Usage: docker search [OPTIONS] TERM Sea ...

  7. http代理阅读3 发送mem处理

    每次客户端有可读数据触发时,优先检测是否还有数据没有发送,如果有则发送数据,然后在读取client数据 //向后端发送请求的调用过程 //ngx_http_upstream_send_request_ ...

  8. ELK处理Spring Boot 日志,妙!

    在排查线上异常的过程中,查询日志总是必不可缺的一部分.现今大多采用的微服务架构,日志被分散在不同的机器上,使得日志的查询变得异常困难. 工欲善其事,必先利其器.如果此时有一个统一的实时日志分析平台,那 ...

  9. django 操作数据库--orm(object relation mapping)---models

    思想 django为使用一种新的方式,即:关系对象映射(Object Relational Mapping,简称ORM). PHP:activerecord Java:Hibernate C#:Ent ...

随机推荐

  1. redis 错误。

    MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Com ...

  2. leetcode Search Insert Position Python

    #Given a sorted array and a target value, return the index if the target is found. If #not, return t ...

  3. OC语法9——Category类别

    Category(分类): 当我们在开发过程中要给类添加新的方法时,一般不要去动原类. 再不改动原类的限制下,怎么拓展类的方法?以往我们的做法是新建子类使其继承该类,然后通过子类拓展类的行为. OC提 ...

  4. mysql登录错误或者密码错误

    一.mysql登录错误 mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root ...

  5. IIS应用程序池监控

    最近发现公司运行的web网站应用程序池会突然停止,做的负载均衡(路由负载)又无法监测到IIS应用程序池的情况,就想着通过某一种监控方式监测IIS应用程序池的情况,如果处关闭状态则立刻重新启动.所说的I ...

  6. Office 2010 Toolkit and EZ-Activator

    “Office 2010 Toolkit 2.0.1”是“迷你KMS”的更新换代版本.虽然是单一可执行程序,但一身承担两大职能:“KMS服务器”和“客户激活端”.“Office 2010 Toolki ...

  7. Android 天天爱消除辅助

    简介 <天天爱消除>是一款移植于手游的消除类益智游戏,该游戏只有通过手机登录QQ跟微信才能进行,这样一来这款游戏必然会大红大紫. 功能 开发Android自动化触屏事件,录制操作脚本,实现 ...

  8. 最近招两个兼职的活(PHP和JSP)

    我这里的活,都是兼职写作的,是两本入门教程, 一本是PHP+Nginx 一本是JSP+Servlet. 都是入门教程,有署名有稿酬,有兴趣的可以联系 QQ:837652732  验证:PHP或Java ...

  9. WISPr1.0

    王桢珍 王兵 侯志强 苑红 中国移动研究院 网络技术研究所, 北京100053 摘要   本文详细介绍了WLAN国际漫游的WISPr1.0技术规范并探讨其具体实现,包括基于WISPr1.0的WLAN国 ...

  10. opensatck 在启动的时候注入额外的信息

    在配置ceph的时候建议使用metadata/cloud-init来注入额外的信息. https://raymii.org/s/tutorials/Automating_Openstack_with_ ...