推 yoshilin: https也是8080port?10/08 17:07
感謝提醒,沒發現打錯https的網址
※ 編輯: sthermit (39.11.194.104 臺灣), 10/08/2020 17:54:04
※ 編輯: sthermit (39.11.194.104 臺灣), 10/08/2020 17:54:42
→ ssccg: 404,先看access log看request是有沒有進到tomcat 10/08 18:24
→ ssccg: 看你網址path都沒動的話,問題應該在host和port那邊吧 10/08 18:49
今天去抓了錯誤資訊
<body>
<h1>HTTP Status 404 - </h1>
<HR size="1" noshade="noshade">
<p><b>type</b> Status report</p>
<p><b>message</b> <u></u></p><p>
<b>description</b>
<u>The requested resource is not available.</u>
</p><HR size="1" noshade="noshade">
<h3>Apache Tomcat/7.0.86</h3>
</body>
看起來好像有 進到TOMCAT?
※ 編輯: sthermit (1.160.26.112 臺灣), 10/09/2020 22:40:50
→ BlacksPig: 網址沒帶專案名稱? 10/10 01:28
示意的網址,websevice 是專案名稱
※ 編輯: sthermit (1.160.26.112 臺灣), 10/10/2020 15:08:13
推 yoyo178134: 如果是第三方簽署的網站 10/10 20:15
→ yoyo178134: 應該要在443port 進行ssl認證 10/10 20:15
→ yoyo178134: 如果是前後端分離的案例的話 10/10 20:15
→ yoyo178134: Https不能打http request防止降級攻擊 10/10 20:15
→ yoyo178134: 試過使用nginx進行proxy_pass 10/10 20:15
→ yoyo178134: 讓https 進來去跟http後端要資料 10/10 20:15
→ yoyo178134: 這樣行的通且可以順便做負載平衡 10/10 20:15
→ yoyo178134: 意思是如果你的簽署網站已經綁在443了 10/10 20:19
→ yoyo178134: 可已在前後端中間架一個nginx 中間來代理 10/10 20:19
→ yoyo178134: 並設定前端的網址在nginx上即可 10/10 20:19
→ BlacksPig: 要不要試試port後面帶兩次專案名/ 10/11 05:22
感謝各位大大不吝賜教
補上後續
後來GOOGLE到一篇文章
小弟是在後端的class 用 @WebServlet 的anotation 定義
需要加上 @ServletSecurity( @HttpConstraint(transportGuarantee =
TransportGuarantee.CONFIDENTIAL))
定義只能用SSL存取,就可以通了
只是還是不太懂,有方法可以讓不管有沒有加密都可以存取嗎?
※ 編輯: sthermit (211.22.92.217 臺灣), 10/12/2020 15:18:14
推 BlacksPig: 看你的貓的server.xml的Connector配置,針對http的部 10/13 00:38
→ BlacksPig: 份有沒有打開(沒註解) 10/13 00:38
→ kentyeh: tomcat維持8080,裝nginxt+Let's Encrypt憑證proxy到tomc 11/10 06:42
→ kentyeh: at,網路都找得到教學 11/10 06:42