Vue uses NGINX refresh page 404 to solve

Nginx is a proxy server.

Problem: Write a good page discovered that the newly written page opened by Nginx as a result of another colleague to open 404, and jump from other pages to be seen but Refresh page 404.

Modified in the nginx.conf file in the file, the code is as follows

 Server {Listen YYYY; // The port number server_name is set by itself; / / IPv4 address after IPConifg under the black window Copy Location / {root e: / Website_Wap / Dist /; // Project packaged path Index index.html index.htm; try_files $ URI $ URI / / /DEX.HTML; // Solve the code}   
Access to the refresh page becomes 404 problem It is

must remember the first npm run build oh ~ (I am in the number of words !!)

Solve code:

Try_files $ URI $ URI / / /DEX.HTML;
  The above is all the content of this article, I hope to help everyone, I hope Everyone supports Tumi Cloud.  
© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment