Home > Web Front-end > JS Tutorial > Encountering a 404 problem when refreshing after packaging a project in vue (detailed tutorial)

Encountering a 404 problem when refreshing after packaging a project in vue (detailed tutorial)

亚连
Release: 2018-06-01 09:32:17
Original
2303 people have browsed it

Below I have compiled an article for you to solve the problem of refreshing 404 after vue packaging project. It has a good reference value and I hope it will be helpful to everyone.

#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

The above is me I compiled it for everyone, I hope it will be helpful to everyone in the future.

Related articles:

vue.js Examples of nested loops, if judgments, and dynamic deletion

Vue.js Example of Layer table data binding and implementation update

##vue2.0 computed Example of calculating the accumulated value after list loop

The above is the detailed content of Encountering a 404 problem when refreshing after packaging a project in vue (detailed tutorial). 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