1、前端:npm run build
server {
listen 80;
server_name lowcode.renren.io;
location / {
root /data/renren-lowcode-admin;
index index.html;
}
}
2、后端部署:
后端打包:
mvn installnohup java -jar renren-server.jar --spring.profiles.active=prod > renren.log &
加后端的配置
server {
listen 80;
server_name lowcode.renren.io;
# 前端配置
location / {
root /work/www/renren-lowcode-admin;
index index.html;
}
# 后端
location /server {
proxy_pass http://127.0.0.1:8080
client_max_body_size 1024m;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
}
nginx 重启
service nginx restart
标签:index,lowcode,set,renren,发布,server,开源,proxy From: https://www.cnblogs.com/cbliu/p/18346544