测试服务器10.19.0.xxx部署
发布服务
前端位置:/usr/local/nginx/html
后台位置:/home/xio/
nohup java -jar 自己的springboot项目.jar >日志文件名.log 2>&1 &
nginx配置:
编辑nginx.conf vim /usr/local/nginx/conf/nginx.conf
location /centreAttendance/ {
alias /usr/local/nginx/html/centreAttendance/;
}
location /employeeAttendance/ {
alias /usr/local/nginx/html/employeeAttendance/;
# #root html;
# index index.html index.htm;
}
location /centreAttendance/api/ {
proxy_pass http://10.19.0.xxx:8083/attendance-iot/;
}
location /employeeAttendance/api/ {
proxy_pass http://10.19.0.xxx:8083/attendance-iot/;
}
location /xio-plough-data-analysis-web/ {
alias /usr/local/nginx/html/xio-plough-data-analysis-web/;
}
location /xio-plough-data-analysis-web/api/ {
proxy_pass http://10.19.0.xxx:9098/;
-
location:代理后访问路径
-
proxy_pass:后台实际访问路径
-
alias:html实际index.html在服务器中的路径