server {
listen 80 default deferred;
server_name myapp.com;
root /var/www/project-folder/;
# Nginx and Angularjs with html mode 5 - https://gist.github.com/cjus/b46a243ba610661a7efb
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
# Location of asset folder
location ~ ^/(assets)/ {
gzip_static on;
gzip_types text/plain text/xml text/css
text/comma-separated-values
text/javascript application/x-javascript
application/atom+xml;
expires max;
}
error_page 404 /404.html;
client_max_body_size 4G;
keepalive_timeout 10;
}