簡體   English   中英

Tomcat 主機和端口配置

[英]Tomcat Host & port Configuration

I have tomcat 5.5 in my windows environment listening to the port:8080.I wanted to change the hostname from localhost to www.mydomain.com.Adding the alias name in the conf/server.xml & adding the entry in /etc/hosts file I achieved this.But I have to access the name with the port number in the URL like http://www.mydomain.com:8080/ .Is there any way with out specifying the port number in the URL, redirect/forward如果 URL 是 www.mydomain.com,對端口 8080 的請求?

您應該可以在 [tomcat home]/conf/server.xml 中更改它(至少在 unix 類型的系統上,但在 win 上應該類似)。 搜索 8080 並在此處更改。

您應該在 server.xml 中找到以下行

<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />

port="8080"更改為port="80"

當然,除非您已經在端口 80 上有了一些東西。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM