user nginx; worker_processes auto; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; 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; sendfile on; sendfile_max_chunk 1m; tcp_nopush on; keepalive_timeout 65; gzip on; gzip_static on; gzip_vary on; gzip_min_length 10240; gzip_proxied any; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; server { listen 80; server_name localhost; root /usr/share/nginx/html; index index.html; location ~* \.(jpg|jpeg|png|ico)$ { expires 30d; } error_page 403 /403.html; error_page 404 /404.html; error_page 500 501 502 503 504 /50x.html; location ~ ^/(403|404|50x).html$ { root /usr/share/nginx/html/errors; internal; } } }