server { listen 8080; server_name 0.0.0.0; error_page 500 502 503 504 /50x.html; error_page 404 /index.html; charset utf-8; source_charset utf-8; charset_types text/css text/xml text/plain text/vnd.wap.wml application/javascript application/rss+xml image/svg+xml; # Allow Envato demo Iframe X-Frame-Options, you may want to remove this proxy_hide_header X-Frame-Options; add_header X-Frame-Options ""; # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|webp|htc|ttf|eot|woff|woff2)$ { sendfile on; tcp_nopush on; tcp_nodelay on; access_log off; add_header Cache-Control "max-age=31536000, immutable"; add_header X-Content-Type-Options "nosniff"; try_files $uri =404; } # CSS and Javascript location ~* \.(?:css|js)$ { access_log off; add_header Cache-Control "max-age=31536000, immutable"; add_header X-Content-Type-Options "nosniff"; try_files $uri =404; } # Return 404 status code if uri contains 404 location ~ 404 { return 404; } location / { root /app; index index.html; add_header Cache-Control "max-age=180, immutable"; try_files $uri $uri/ /index.html; } location = /50x.html { root /usr/share/nginx/html; } }