美文网首页java
B2C 部署文档

B2C 部署文档

作者: angelali_90b4 | 来源:发表于2020-08-19 10:02 被阅读0次

    注:要首先配置ngnix 和nacos
    1.生成jar

    mvn install -DskipTests
    

    2.上传至服务器
    目录:

    cd /opt/product/admin
    cd /opt/product/custom
    cd  /opt/product/order
    cd  /opt/product/goods
    

    3.执行命令 ps -ef | grep java Kill 掉 启动新的jar

    1. 启动命令
    sudo nohup java -jar  xxx.jar
    sudo nohup java -jar boai-order-0.0.1-exec.jar 
    sudo nohup java -jar boai-goods-0.0.1-exec.jar 
    sudo nohup java -jar boai-custom-0.0.1-exec.jar 
    sudo nohup java -jar boai-admin-0.0.1-exec.jar 
    
    

    5.查看日志

    cd /opt/product/wechat/logs
    命令 
    
    sudo tail -f nohup.out
    

    6.ngnix配置

    h5boai.conf
    server {
            listen       80;
            server_name j.o2o.shrckj.net;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Real-Port $remote_port;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        client_max_body_size 30m;
        location /api/order/{
          proxy_pass http://127.0.0.1:8030/api/order/;
        }
        location /api/custom/{
          proxy_pass http://127.0.0.1:8010/api/custom/;
        }
            location /api/goods/{
          proxy_pass http://127.0.0.1:8020/api/goods/;
        }
        location /gateway/{
          proxy_pass http://127.0.0.1:8085/;
        }
        
        location /{
        try_files $uri $uri/ /index.html;
            root /opt/product/H5/boai/;
            }  
        }
    
    server {
            listen       80;
            server_name b2ca.boaiyiyao.com;
        client_max_body_size 30m;
        
            location /api/{
          proxy_pass http://127.0.0.1:8040/api/;
        }
        location /{
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header REMOTE-HOST $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          try_files $uri $uri  /index.html;
              root /opt/product/admin/static;
        }
        }
    

    相关文章

      网友评论

        本文标题:B2C 部署文档

        本文链接:https://www.haomeiwen.com/subject/pahrjktx.html