Home > Web Front-end > JS Tutorial > body text

What should I do if Vue refreshes and displays 404 after packaging the project?

php中世界最好的语言
Release: 2018-04-11 16:57:34
Original
2674 people have browsed it

This time I will bring you how to deal with Vue refreshing and displaying 404 after packaging the project. What are the precautions when dealing with Vue refreshing and displaying 404 after packaging the project. The following is a practical case. Let’s take a look. one time.

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; 
  } 
}
Copy after login

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:

Vue implements sliding stacking components

##How to deal with the white screen on the homepage after vue build is packaged

The above is the detailed content of What should I do if Vue refreshes and displays 404 after packaging the project?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!