user  nobody;

worker_processes  4;
 
error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
 
pid        logs/nginx.pid;
 
 
events {
    worker_connections  1024;
}
 
 
http {
    include       mime.types;
    default_type  application/octet-stream;
#    include       /usr/local/nginx/conf/proxy.conf;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
 
    access_log  logs/access.log;
 
    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
     large_client_header_buffers 4 32k;
 
    sendfile        on;
#    tcp_nopush     on;
    tcp_nodelay   on;
    #keepalive_timeout  0;
    keepalive_timeout  120;
 
    
    server_tokens off;
    gzip  on;
    gzip_min_length  1k;
    gzip_buffers 4 16k;
    gzip_types  text/plain;
 
     fastcgi_buffers 8 128k;
     fastcgi_buffer_size 128k;
     fastcgi_busy_buffers_size 256k;
     fastcgi_temp_file_write_size 256k;
     fastcgi_connect_timeout 600;
     fastcgi_send_timeout 600;
     fastcgi_read_timeout 600;
 
 
    client_header_timeout 3m;
    client_body_timeout 3m;
    client_max_body_size       10m;
    client_body_buffer_size    128k;
 
 
    proxy_connect_timeout 90;
    proxy_read_timeout 90;
    proxy_buffer_size 90;
    proxy_buffers 4 32k;
    proxy_temp_file_write_size 64k;
    proxy_busy_buffers_size 64k;
 
        upstream img1.abc.cn {
        server 192.168.50.186:80;
        }
 
        upstream putty.abc.cn{
        server 192.168.50.185:80;
        }
 
upstream avatar.abc.cn80 {
        server 192.168.50.184:80;
        }
 
upstream avatar.abc.cn8080{
        server 192.168.50.184:8080;
        }
 
server {
          listen            80;
        server_name     avatar.abc.cn;
        location / {
                proxy_set_header Host  $http_host;
         proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_pass http://avatar.abc.cn80;
        }
        }
 
server {
          listen            8080;
        server_name     avatar.abc.cn;
        location / {
                proxy_set_header Host  $http_host;
         proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_pass http://avatar.abc.cn8080;
        }
        }
 
server {
          listen            80;
        server_name   ava1-c.ab.cn  img1.abc.cn;
        location / {
                proxy_set_header Host  $http_host;
         proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_pass http://img1.abc.cn;
        }
}
 
server {
          listen            80;
        server_name     putty.abc.cn qa.putty.abc.cn;
        location / {
                proxy_set_header Host  $http_host;
         proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_pass http://putty.abc.cn;
        }
        }
}