user  root;
worker_processes  4;
events {
    use epoll;
    multi_accept on;
    worker_connections  61024;
}


##此处代理tcp服务
stream {
    upstream mq_server{
        server 10.10.35.17:5672 max_fails=2 fail_timeout=10s;
        server 10.10.35.18:5672 max_fails=2 fail_timeout=10s;
        server 10.10.35.19:5672 max_fails=2 fail_timeout=10s;
    } 
    server { 
        listen  5671 so_keepalive=on;
        proxy_connect_timeout 300s; 
        proxy_timeout 300s; 
        proxy_pass mq_server;
    }
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    #access_log  logs/access.log  main;
    client_max_body_size   100m;

    log_format main '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" "$upstream_response_time"';
    map $http_user_agent $samesite_none { "~*chrome/[8|9].*" ';httponly; secure; SameSite=NONE'; default ';httponly; secure;'; }

    sendfile        on;
    #tcp_nopush     on;
    gzip    on;
    gzip_buffers   4 8k;
    gzip_comp_level 2;
    gzip_min_length 1000;
    gzip_types text/plain text/json text/css application/x-httpd-php application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript image/png image/jpg image/jpeg image/gif image/bmp;
    server_tokens off;
    keepalive_timeout  65;
	
    include conf.d/*.conf;
}
