1、前端:npm run build
server {
listen 80;
server_name lowcode.renren.io;
location / {
root /data/renren-lowcode-admin;
index index.html;
}
}
2、後端部署:
後端打包:
nohup 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