# 4核8g机器的nginx代理配置
# vim /usr/local/nginx/conf/nginx.conf
user  nginx;
worker_processes  8;
worker_rlimit_nofile 102400;

error_log  /data0/log/nginx/error.log  notice;

pid        /data0/log/nginx/nginx.pid;


events {
    use epoll;
    worker_connections  65535;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  nginx_log  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';


    client_max_body_size 50m;
    client_body_buffer_size   256k;
    client_header_timeout 120s;
    client_body_timeout 120s;
    send_timeout 1m; 
   
    sendfile        on;
    keepalive_timeout  120;

    proxy_ignore_client_abort on;
    proxy_connect_timeout 600;
    proxy_read_timeout 600;
    proxy_send_timeout 600;
    proxy_buffer_size 32k;
    proxy_buffers 8 128k;
    proxy_busy_buffers_size 128k;
    proxy_temp_file_write_size 512k;
    
    gzip  on;
    server {
        listen 80 default_server;
        server_name _;
        return 404;
    }

include vhosts/*.conf;
}