Introduction: The project uses vue-cli directly build the project, and then use proxyTable interface agent, at a local call back interfaces, everything is normal, but when the latter packaged on-line, find the page interface packet 404, after finding solutions to:
the background to modify nginx proxy configuration :
LOCATION / API {
proxy_set_header the Host Host $;
proxy_set_header for X-Forwarded-$ REMOTE_ADDR;
proxy_set_header the IP-X-Real-$ REMOTE_ADDR;
proxy_pass interface address; // address of the interface, if on the same server, may be directly written
}
And then restart it, you can successfully access.
Note: Front novice, problem areas pointed out the great God, please, if infringement, true unintentionally, delete stand, thank you ~