This time I will show you how to deal with the 404 refresh after the vue project is packaged. What are the precautions when dealing with the refresh 404 after the vue project is packaged. The following is a practical case, let's take a look.
The problem of refreshing 404 after vue packages the project Nginx configuration
server { listen 80; server_name localhost; index index.html; root /root/dist; location / { root /root/dist; try_files $uri $uri/ /index.html =404; } }
I believe you have mastered the method after reading the case in this article, please come for more exciting information Pay attention to other related articles on php Chinese website!
Recommended reading:
Solution to the problem that vue2.0 routing does not display router-view
After clicking the component in Vue The implementation method of closing the component
The above is the detailed content of How to deal with refresh 404 after vue project is packaged. For more information, please follow other related articles on the PHP Chinese website!