user nginx; worker_processes auto; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { use epoll; worker_connections 1024; multi_accept on; } http { vhost_traffic_status_zone; include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $host [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; server_names_hash_bucket_size 256; ## Proxy proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 50m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffers 8 16k; proxy_buffer_size 32k; ## server the content gzip compressed gzip on; gzip_static on; gzip_http_version 1.0; gzip_min_length 1000; gzip_comp_level 9; gzip_proxied any; gzip_vary on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; gzip_types text/plain text/css application/json text/xml application/x-javascript text/javascript application/javascript application/x-font-ttf application/x-font-otf application/vnd.ms-fontobject application/xml application/xml+rss; gzip_buffers 16 8k; output_buffers 1 32k; postpone_output 1460; ### TCP options tcp_nodelay on; tcp_nopush off; keepalive_timeout 10; sendfile on; keepalive_requests 150; server_tokens off; # min to send as little information as possible server_name_in_redirect off; ignore_invalid_headers on; include /etc/nginx/sites-available/default; include /etc/nginx/sites-enabled/*; }