zoukankan      html  css  js  c++  java
  • nginx filter

    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+xd+_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+xd+_d+ad+.(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;
    }
    

      

    现主要从事PHP、Uinx/Linux、C/C++等方面的项目开发。
  • 相关阅读:
    IOS7笔记-10、多线程、滚动视图
    IOS7笔记-8、协议、block、动画
    IOS7笔记- 7、视图、绘制、手势识别
    IOS7笔记-6、控制器多态性、导航控制器、选项卡栏控制器
    IOS7笔记-5、视图控制器生命周期
    C# DevExpress之GridView同步滚动条记录方法
    C# 隐藏TabControl标签
    VC++ 如何识别系统语言类别
    我的免费空间网站
    慕课网-Java入门第一季-7-5 Java 中带参无返回值方法的使用
  • 原文地址:https://www.cnblogs.com/lsl8966/p/4600107.html
Copyright © 2011-2022 走看看