xone

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
[root@smindu nginx]# cat nginx.conf 

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}

stream {
    upstream tcp {
        zone upstream_tcp 64k;
        server 172.17.184.184:30443 max_fails=3 fail_timeout=30s;
        server 172.17.184.185:30443 max_fails=3 fail_timeout=30s;
        server 172.17.184.186:30443 max_fails=3 fail_timeout=30s;
    }
    server {
        listen 30443;
        proxy_pass tcp;
        proxy_connect_timeout 1s;
        proxy_timeout 3s;
    }
}

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

    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  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;
    types_hash_max_size 2048;
    client_body_timeout 120s;
    client_max_body_size 20m;


    include /etc/nginx/conf.d/*.conf;
}
posted on 2021-06-23 16:09  周小百  阅读(828)  评论(0)    收藏  举报