本文共 1183 字,大约阅读时间需要 3 分钟。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | # 4核8g机器的nginx代理配置 # vim /usr/local/nginx/conf/nginx.conf user nginx; worker_processes 8; worker_rlimit_nofile 102400; error_log /data0/log/nginx/error .log notice; pid /data0/log/nginx/nginx .pid; events { use epoll; worker_connections 65535; } http { include mime.types; default_type application /octet-stream ; log_format nginx_log '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"' ; client_max_body_size 50m; client_body_buffer_size 256k; client_header_timeout 120s; client_body_timeout 120s; send_timeout 1m; sendfile on; keepalive_timeout 120; proxy_ignore_client_abort on; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; proxy_buffer_size 32k; proxy_buffers 8 128k; proxy_busy_buffers_size 128k; proxy_temp_file_write_size 512k; gzip on; server { listen 80 default_server; server_name _; return 404; } include vhosts/*.conf; } |