我想你可以給一個新的端口屬性值,不要添加地址屬性,並且應該將Tomcat綁定到所有地址。如果您只想爲一個主機名提供address="192.168.1.2"
屬性。
<Connector port="80" protocol="org.apache.coyote.http11.Http11Nio2Protocol"
connectionTimeout="60000" redirectPort="443"
acceptCount="1000" acceptorThreadCount="2" maxConnections="10000" maxThreads="400"
compression="on" compressionMinSize="2048"
compressableMimeType="application/json, text/json, application/xml, text/xml"
/>
<Connector port="443" protocol="org.apache.coyote.http11.Http11Nio2Protocol"
connectionTimeout="60000"
acceptCount="1000" acceptorThreadCount="2" maxConnections="10000" maxThreads="400"
keystoreFile="./keystore.jks" keystorePass="mypwd" keyAlias="tomcat"
SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS"
compression="on" compressionMinSize="2048"
compressableMimeType="application/json, text/json, application/xml, text/xml"
/>
聽起來像你在正確的軌道上,但你在主機文件和server.xml中更改了什麼?你能顯示一些代碼嗎? – acdhirr