The problem of putting the front and background of the vue project on two servers

foreground and background are placed on two servers

the foreground uses a reverse proxy to request an interface on another server

but 404

ask whether this is the front desk or the server

Mar.21,2021

you first try to visit the home page directly to see if you can access it, for example: a.com ,
if you can, and the page 404 with route like a.com/-sharp/login is the page with no routing in the background, or change the mode of vue-router to the default value hash .
if none of them can be accessed, it is a problem that the backend is not configured with a reverse proxy.

Menu