worker_processes auto; worker_rlimit_nofile 65535; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 4096; use epoll; multi_accept on; accept_mutex_delay 100ms; } http { limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m; limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=10r/s; include /etc/nginx/mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 75; keepalive_requests 100; types_hash_max_size 2048; server_tokens off; client_max_body_size 10m; client_body_buffer_size 128k; client_body_timeout 12; client_header_timeout 12; send_timeout 30; reset_timedout_connection on; client_header_buffer_size 1k; large_client_header_buffers 4 8k; gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; limit_req_status 429; limit_conn_status 429; include /etc/nginx/conf.d/*.conf; }