#### 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;
}
}
}
阅读(841) | 评论(0) | 转发(0) |