#user nobody; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; gzip on; gzip_vary on; gzip_min_length 10240; gzip_proxied expired no-cache no-store private auth; gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml application/javascript; gzip_disable "MSIE [1-6]\."; client_max_body_size 20m; server { location / { if (${DOLLAR}http_x_requested_with = "XMLHttpRequest") { proxy_pass http://${machine_host}:${be_port}; break; } if (${DOLLAR}request_filename ~ .*\.(?:htm|html)$) { add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate"; add_header Expires 0; } charset utf-8; root /var/www; index index.html index.htm index.shtml; try_files ${DOLLAR}uri /index.html; } listen 7777; } }