As a vue.js front-end server, I want to use the ’webHistory’ mode router, but it need define 'try_files' or 404 page on the server, how can i do that?
the nginx config like this:
location / {
root D:\Test\exprice\dist;
index index.html index.htm;
try_files $uri $uri / /index.html;
}
or
location /{
root /data/nginx/html;
index index.html index.htm;
error_page 404 /index.html;
}