Skip to content

Instantly share code, notes, and snippets.

@jiangtao
Created November 14, 2017 06:39
Show Gist options
  • Save jiangtao/0c3803b8d6cc6b0c2b8b8c7b93db0fdb to your computer and use it in GitHub Desktop.
Save jiangtao/0c3803b8d6cc6b0c2b8b8c7b93db0fdb to your computer and use it in GitHub Desktop.
nginx vue history conf
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