user apache apache;

worker_processes 4;

worker_cpu_affinity 0001 0001 0010 0010;

worker_rlimit_nofile 65535;

# pid /var/run/nginx.pid;

events {

    use epoll;

    worker_connections 65535;

    multi_accept on;     # multi_accept off;

    accept_mutex off;

}

http {

    include /etc/nginx/mime.types;

    default_type application/octet-stream;

    log_format common '$remote_addr - $remote_user [$time_local] $request'

                      '"$status" $body_bytes_sent ';

    access_log off;

    sendfile on;

    sendfile_max_chunk 80m;    #sendfile_max_chunk 80m;

    tcp_nopush on;

    tcp_nodelay on;

    keepalive_timeout 120;     # keepalive_timeout 65; #长连接超时时间设定

    keepalive_requests 10000;

    open_file_cache max=204800 inactive=20s;

    open_file_cache_min_uses 1;

    open_file_cache_valid 30s;

    open_file_cache_errors on;

    read_ahead 4096;   # 预读取块大小

    charset utf-8;

    server_names_hash_bucket_size 128;

    large_client_header_buffers 4 4k;   # 4 个大小为 4k 的缓冲区来存储客户端请求头信息。

    include /etc/nginx/conf.d/*.conf;
    fastcgi_read_timeout 300s;

}
