Bryan Huangckscks038038.hashnode.dev·Feb 23, 2024如何用Tomcat redirect port 80 to 8080最近剛好學校作業要求用Tomcat來部屬網站,需要把從port80得到的請求導向Tomcat預設的服務端口port8080,好讓使用者在網頁請求時不會看到醜醜的:8080。 沒用過Tomcat也不會寫Java(?,但想想它終究是個HTTP web server,應該有個地方可以設定一下吧。果然在tomcat/conf/ 路徑下,有個叫做server.xml 的檔案,裡面可以找到有個<Service>開頭的區塊,其中的port只要改成80就好。 於是我改了,但還是跑不動阿。查了Tomcat的Log...TomcatAdd a thoughtful commentNo comments yetBe the first to start the conversation.