Nginx deploys SSM and vue front-end and back-end separation connection problem

1. Go to nginx to download and unzip the installation package (I am under windows)
2. Open the nginx.conf configuration file in the conf folder
Insert picture description here3 Add the code for configuring the back-end port

upstream base_server{ #转发至后端接口
    server localhost:8088;
    #keepalive 2000;
}

Then copy the contents of the packaged dist folder directly to the nginx html1 folder Insert picture description hereand then cmd to the nginx path,
run start nginx, open the browser and enter localhost/80
(80 is the default port of nginx, I didn’t change it. (You can change it in the configuration file yourself)

Guess you like

Origin blog.csdn.net/ssdssa/article/details/112966181