worker_processes 2; error_log ./nginx.error.log; worker_rlimit_nofile 8192; pid nginx.pid; events { worker_connections 1024; multi_accept on; } http { access_log off; charset UTF-8; types { text/html html htm shtml; text/css css; text/xml xml rss; image/gif gif; image/jpeg jpeg jpg; application/x-javascript js; text/plain txt; image/png png; image/svg+xml svg; image/x-icon ico; application/pdf pdf; text/cache-manifest appcache; } gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; server { listen 3301; server_name localhost; root ./build/; index index.html; location ~* \.(?:manifest|appcache|html?|xml|json|css|js|map|jpg|jpeg|gif|png|ico|svg|eot|ttf|woff|woff2)$ { expires -1; add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Credentials true; add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; add_header Access-Control-Allow-Headers 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; access_log off; } location / { try_files $uri $uri/ /index.html =404; } } }