user www www; worker_processes auto; error_log logs/error.log warn; pid logs/nginx.pid; # Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 65535; events { use epoll; worker_connections 65535; multi_accept on; } http { include 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" ' '$upstream_addr $request_time $upstream_response_time $msec'; sendfile on; tcp_nopush on; tcp_nodelay on; send_timeout 25; client_header_timeout 60; client_body_timeout 10; client_max_body_size 512m; client_header_buffer_size 32k; server_names_hash_bucket_size 128; large_client_header_buffers 4 32k; keepalive_timeout 60; ## Configuration Request PHP Dynamic Engine Service Related Parameters #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 256k; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 6; gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss application/json; gzip_vary on; gzip_proxied expired no-cache no-store private auth; gzip_disable "MSIE [1-6]\."; #limit_conn_zone $binary_remote_addr zone=perip:10m; ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section. ##real_ip #include xxx.conf; #real_ip_header X-Forwarded-For; #real_ip_recursive on; server_tokens off; ##limit #include limit.conf; ## websocket config ## create var connection_upgrade: ## if http_upgrade = '' : connection_upgrade = close map $http_upgrade $connection_upgrade { default upgrade; '' close; } ## vhost include vhost/*.conf; }