[精讚] [會員登入]
753

spring boot 整合到 nginx 於subpath

將spring boot 位在docker中, 對外服務19090 程式佈署到nginx 伺服器的 subpath上 對

分享此文連結 //n.sfs.tw/16286

分享連結 spring boot 整合到 nginx 於subpath @igogo
(文章歡迎轉載,務必尊重版權註明連結來源)
2023-12-18 16:17:58 最後編修
2023-12-18 10:35:17 By igogo
 

 

 

將spring boot 位在docker中, 對外服務19090

程式佈署到nginx 伺服器的 subpath上

使用reverse proxy

 

對外服務網址  https://nginx.server/user

 

spring boot 端

application.properties


server.port=19090
server.servlet.context-path=/user

其它的request mapping 依舊以根 /  出發

 

nginx.conf

   location  /user {

                proxy_pass http://spring-boot-container:19090/;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;

                proxy_set_header X-Forwarded-Prefix '/user';
     }

 

END

你可能感興趣的文章

利用google apps script 將Google sheet 中兩個工作表中的資料對應 如何整理google測驗收回來的學生資料

spring boot 整合到 nginx 於subpath 將spring boot 位在docker中, 對外服務19090 程式佈署到nginx 伺服器的 subpath上 對

[scratch] 將角色物件放到清單中,並依序讀出每個角色的X值 將角色物件放到清單中,並依序讀出每個角色的X值

scratch3 計算得分排名 scratch3 得分排名

[scratch2] 巢狀迴圈 有兩清單 一數字 一英文 想排出所以可能, 例如1a,1b,1c,2a,2b,2c...3c 利用巢狀迴圈 內圈累加的變

scratch 不重覆隨機取陣列值 隨機取數是在設計遊戲時, 很常用到的技巧 最簡單的就是使用運算積木裡的隨機取數範圍 但是, 如果我是想全部取出且不重覆,

隨機好文

java-身份証字號驗証 FormatCheck.java public class FormatCheck { private volatile

centos 7 移机出現 dracut-initqueue timeout centos 7 移机出現 dracut-initqueue timeout 處理

讀取特定資料夾下的xls檔 讀取特定資料夾下的xls檔

臺中市校務雲端系統與Windows AD帳號整合(1) active directory,ldaps,雲端校務系統

臺中市雲端校務系統與Windows AD帳號整合(3) LDAP的基本概念