Home  >  Article  >  Web Front-end  >  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)

亚连
亚连Original
2018-06-01 09:32:172254browse

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; 
  } 
}

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!

Statement:
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