简版的,详细参数需要自己微调。
nginx.conf
http{ upstream name { server 127.0.0.1:8777; server 127.0.0.1:8778; server 127.0.0.1:8779 server 127.0.0.1:8780; } server{ listen 80; server_name www.brightlike.site; keepalive_timeout 65; # proxy_read_timeout 2000; # sendfile on; tcp_nopush on; tcp_nodelay on; location / { client_max_body_size 300m; client_body_buffer_size 128k; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; proxy_buffer_size 64k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; proxy_pass_header Server; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_pass http://backend; } } }