后台启用jar包,然后绑定对应端口域名:

nohup java -jar abc.jar --spring.profiles.active=test >abc.txt &

.conf文件如下:

server {
        listen 80;
        server_name t.abc.com;

        index index.php index.html index.htm;
        location /{
            proxy_pass http://127.0.0.1:8012/;
                        
            proxy_set_header    Host    $http_host;
            proxy_set_header    X-Real-IP   $remote_addr;
            proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-For $remote_addr;
        }

 }

  

proxy_pass 地址端口需要跟配置文件中的 server:port相同。

相关文章:

  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-08-06
  • 2022-12-23
猜你喜欢
  • 2021-07-25
  • 2021-12-26
  • 2022-12-23
  • 2021-11-20
  • 2021-11-20
  • 2022-03-07
  • 2022-12-23
相关资源
相似解决方案