# 2023-10-13 user root; worker_processes auto; worker_rlimit_nofile 100000; pid /var/run/nginx.pid; #error_log /var/log/nginx/error.log notice; error_log off; thread_pool default threads=2048 max_queue=65536; events { worker_connections 4096; multi_accept on; use epoll; } http { resolver xxx.xxx.xxx.xxx ipv6=off valid=300s; include /etc/nginx/mime.types; default_type application/octet-stream; server_names_hash_bucket_size 128; server_names_hash_max_size 1024; 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; access_log off; sendfile on; tcp_nodelay on; tcp_nopush on; keepalive_timeout 120; keepalive_requests 100000; send_timeout 30; client_body_timeout 30; client_header_timeout 30; reset_timedout_connection on; open_file_cache max=2000 inactive=20s; open_file_cache_valid 60s; open_file_cache_min_uses 5; open_file_cache_errors off; server_tokens off; types_hash_max_size 2048; client_body_buffer_size 128k; client_header_buffer_size 3m; client_max_body_size 128k; large_client_header_buffers 8 256k; add_header X-XSS-Protection "1; mode=block"; add_header X-Frame-Options "SAMEORIGIN"; add_header X-Content-Type-Options nosniff; add_header Strict-Transport-Security "max-age=63072000" always; add_header Access-Control-Allow-Origin "*"; add_header Access-Control-Allow-Headers "*, Authorization"; add_header X-Permitted-Cross-Domain-Policies "all"; aio threads=default; gzip on; gzip_static on; gzip_min_length 10240; gzip_comp_level 3; #gzip_http_version 1.1; gzip_vary on; gzip_disable msie6; gzip_disable "MSIE [1-6]\."; gzip_proxied any; gzip_buffers 16 8k; gzip_types text/plain text/css text/xml text/javascript text/x-component application/x-javascript application/xml application/javascript application/json application/xml+rss application/rss+xml application/atom+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml application/geo+json application/ld+json application/manifest+json application/rdf+xml application/wasm application/x-web-app-manifest+json application/xhtml+xml font/eot font/otf font/ttf image/bmp text/cache-manifest text/calendar text/markdown text/vcard text/vnd.rim.location.xloc text/vtt text/x-cross-domain-policy application/x-font-ttf image/x-icon; include /etc/nginx/conf.d/*.conf; }