默认情况tomcat和apache是监听端口的,但是服务器上多个网卡时,可能需要监听某个特定的ip。如下配置:

下面的设置是让tomcat监听某个ip

修改tomcat的server.xml文件、在connector中添加address参数。

<Connector port="8080" address="10.10.10.10" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

 

下面的设置是让apache监听某个特定的ip:

修改httpd.conf文件,将Listen 80改为Listen 10.10.10.10:80


               

相关文章:

猜你喜欢
相关资源
相似解决方案