#运行程序用户与用户组
user  www www;

#
worker_processes  2;
worker_cpu_affinity 01 10;
#
worker_rlimit_nofile 65535;

#错误日志路径
#error_log  /data/logs/nginx_error.log debug;

#
pid        /var/run/nginx.pid;

#
events {
    worker_connections  65535;
    use epoll;
}

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

    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 40m;

    sendfile        on;
    tcp_nopush      on;
    tcp_nodelay     on;
    server_tokens   off;

	#静态压缩设置
    gzip            on;
    gzip_comp_level 2;
    gzip_min_length 1024;
    gzip_buffers    4 16k;
    gzip_http_version 1.0;
    gzip_types      text/plain application/x-javascript text/css application/xml;
    gzip_vary       on;

	#php fastcgi设置
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 128k;
    
    proxy_ignore_client_abort on;

    keepalive_timeout  60;

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

    include blocksip.conf;
	
	#虚拟站点配置路径
    include vhost.d/*.conf;
}
