Last active
August 3, 2020 21:58
-
-
Save tiagomestre/492e5c22c98cdd6191ac0f5b163712dc to your computer and use it in GitHub Desktop.
Nginx for vue and vue-router in production
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
server { | |
listen 8080; | |
server_name //HOST NAME HERE | |
root /usr/share/nginx/html; | |
index index.html; | |
gzip_static on; | |
include mime.types; | |
sendfile on; | |
sendfile_max_chunk 1m; | |
location /index.html { | |
etag on; | |
} | |
location /health { | |
access_log off; | |
return 200; | |
} | |
location / { | |
etag off; | |
add_header "Cache-Control" "public, max-age=604800, immutable"; | |
try_files $uri /index.html; | |
} | |
} | |
} | |
events { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment