Created
November 14, 2017 06:39
-
-
Save jiangtao/0c3803b8d6cc6b0c2b8b8c7b93db0fdb to your computer and use it in GitHub Desktop.
nginx vue history conf
This file contains 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
server { | |
listen 8100; | |
root $HOME/Places/Code/pay-day-loan/dist; | |
index index.html | |
server_name 127.0.0.1; | |
location / { | |
try_files $uri $uri/ @rewrites; | |
} | |
location @rewrites { | |
rewrite ^(.+)$ /index.html last; | |
} | |
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | |
expires max; | |
add_header Pragma public; | |
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment