Chinaunix首页 | 论坛 | 博客
  • 博客访问: 806777
  • 博文数量: 222
  • 博客积分: 4341
  • 博客等级: 上校
  • 技术积分: 2155
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-16 13:50
个人简介

...

文章分类

全部博文(222)

文章存档

2019年(1)

2016年(9)

2015年(7)

2014年(14)

2013年(11)

2012年(10)

2011年(6)

2010年(25)

2009年(37)

2008年(21)

2007年(81)

我的朋友

分类: 系统运维

2016-10-09 16:10:46

#### nginx.conf


worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    proxy_temp_path temp/proxy_temp;
    proxy_cache_path temp/proxy_cache levels=1:2 keys_zone=cache_one:200m inactive=1d max_size=30g ;
    proxy_connect_timeout 60; 
    proxy_read_timeout 60; 
    proxy_send_timeout 60; 
    proxy_buffer_size 32k; 
    proxy_buffers 4 64k; 
    proxy_busy_buffers_size 128k; 
    proxy_temp_file_write_size 128k; 
    proxy_next_upstream error timeout invalid_header http_500 http_503 http_404; 
    proxy_cache cache_one; 

    upstream osyunweihost {
        server weight=1 max_fails=2 fail_timeout=30s;
    }

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       8088;
        server_name  localhost;
        location / {
                proxy_pass
                proxy_cache cache_one;
        }

        error_page   500 502 503 504  /50x.html;

   location ~ .*.(gif|jpg|jpeg|png|bmp|swf|js|css)$
   {
       proxy_pass
       proxy_redirect off;
       proxy_cache cache_one;
       proxy_cache_valid 200 302 1h;
       proxy_cache_valid 301 1d;
       proxy_cache_valid any 1m;
       expires 30d;
       }
    }
}
阅读(775) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~