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. HDU 2685 I won't tell you this is about number theory

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2685 题意:求gcd(a^m - 1, a^n - 1) mod k 思路:gcd(a^m - 1, ...

  2. Docker容器的网络连接

    Docker容器的网络连接 Docker容器的网络连接 我们用ifconfig命令来查看网络设备 我们可以看到上面有个叫docker0的网络设备,docker守护进程就是通过docker0为docke ...

  3. Header() in PHP &html – Refresh (Redirect) to Location (URL) in X seconds

    Case 1 : Redirect a page to a URL without waiting in PHP. 1 header("Location: index.php"); ...

  4. 走进C标准库(3)——"stdio.h"中的getc和ungetc

    接前文. 再来看看getc和ungetc的实现.在看这两个函数的实现之前,我们先来想一想这两个函数分别需要做的工作. int getc(FILE *stream) 说明:函数getc从stream指向 ...

  5. 【Chromium中文文档】Profile架构(看看谷歌家的重构)

    进程模型 转载请注明出处:https://ahangchen.gitbooks.io/chromium_doc_zh/content/zh//General_Architecture/Profile_ ...

  6. SQL Server 向堆表中插入数据的过程

    堆表中  IAM 记录着的数据页,表的各个数据页之间没有联系.也就是说一个页面它不会知道自己的前一页是谁,也不知道自己的后一页是谁. 插入数据时先找到IAM页,再由pfs(page free spac ...

  7. Oracle EBS-SQL (BOM-2):检查期间Bom的更改记录数.sql

    Select MSI1.Segment1          上层编码,       MSI1.Description           上层描述,       MSI2.Segment1       ...

  8. C#版-百度网盘API的实现(二)

    在这篇文章中,我们通过代码来实现百度网盘的简单操作, 一,登陆,在代码中,我有一个Baidu1的类,实例化该类时回执行登陆方法,该类对外开放了三个方法, 1,GetFileDir获取根目录下的文件夹及 ...

  9. iPhone/iTouch免99美刀真机调试

    本文经本人验证,攻略来源于网上,由于多次转载原始出处不可靠,故无法对原作者进行链接引用,抱歉. 本文仅为记录流程,以备日后查询.本文版权所无,欢迎转载和拍砖. 测试环境: XCode 4.0.2 + ...

  10. [LeetCode][Python]Palindrome Number

    # -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'https://oj.leetcode.com/problems/palindr ...