# This section configures Nginx http context
# Basic Settings # ————————————- default_type application/octet-stream;
sendfile on; client_max_body_size 5M;
# tcp_nopush causes nginx to attempt to send its HTTP response header # in one package instead of using partial frames. This is useful for # prepending headers before calling sendfile, or for throughput optimization tcp_nopush on;
# Do not buffer data-sends (disable Nagle algorithm). # Good for sending frequent small bursts of data in real time tcp_nodelay on;
# Gzip Settings # ————————————- gzip on; gzip_http_version 1.1; gzip_proxied any; gzip_min_length 500; gzip_disable “MSIE [1-6].”; gzip_types text/plain text/xml text/css text/javascript
application/json application/xml application/javascript application/x-javascript application/rss+xml application/atom+xml;
# Proxy Settings # ————————————- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_redirect off;
# Access Log Settings # ————————————- log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" "$request_time"';