# For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation: http://nginx.org/ru/docs/ # Do not start as daemon daemon off; worker_rlimit_nofile 100000; worker_processes auto; error_log stderr warn; pid /var/run/nginx/nginx.pid; # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; server_tokens off; keepalive_timeout 15; sendfile on; tcp_nodelay on; log_format custom_log '[$time_local] [NGINX] - $remote_addr - $remote_user - ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"'; # Log access to stdout access_log /dev/stdout custom_log; # SSL ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:2m; # buffering causes issues, disable it # increase buffer size. still useful even when buffering is off proxy_buffering off; proxy_buffer_size 4k; # Buffer size client_body_buffer_size 10k; client_header_buffer_size 1k; client_max_body_size 8m; large_client_header_buffers 2 1k; # Timeouts client_body_timeout 12; client_header_timeout 12; send_timeout 10; # GZip Compression gzip on; gzip_http_version 1.0; gzip_vary on; gzip_comp_level 4; gzip_min_length 1280; gzip_buffers 128 4k; # gzip_proxied expired no-cache no-store private auth; gzip_proxied any; gzip_disable "msie6"; # gzip_types text/plain application/x-javascript text/xml text/css application/xml; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp; include /etc/nginx/conf.d/*.conf; }