[英]Publish WebLogic instance to other computers in the same wifi network and/or internet
[英]Can I publish my tomcat instance to other computers in the same wifi network? How about the internet?
場景:在一台Windows 7計算機上運行的Tomcat實例,已發布1個應用程序。
目標1:提供對同一實例的訪問,該實例位於同一WIFI網絡中的另一台計算機上
嘗試過的事情:從客戶端計算機,嘗試訪問http://<IPofComputerWithTomcat>:8080/
, http://hostnameofComputerWithTomcat:8080
,找不到頁面。
目標2:提供對本地網絡之外的該實例的訪問,即 互聯網
嘗試:不知道如何開始。
最好在ServerFault上問這個問題,
我猜您的Tomcat綁定到了本地接口,因此無法從外部訪問。
如果您想讓Tomcat處理來自任何其他主機(相同的wifi網絡和Internet)的請求,請在server.xml配置文件中更改連接器(有關詳細信息,請參見官方文檔 )
<Connector port="8080"
protocol="HTTP/1.1"
address="0.0.0.0"
connectionTimeout="20000"
redirectPort="8443" />
重要的部分是address="0.0.0.0"
,它將您的tomcat綁定到所有網絡接口。
如果它已經就位,則可能還有防火牆或其他Windows網絡設置阻止傳入的請求。
如果可以訪問Tomcat,但收到諸如404之類的錯誤消息,請確保使用正確的URL:
http://<TomcatHostOrIP>:8080/Context/
其中Context通常是您的war文件的名稱。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.