默认情况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


               

相关文章:

  • 2021-06-28
  • 2021-08-12
  • 2021-05-06
  • 2021-10-12
  • 2022-01-18
  • 2021-06-15
  • 2021-10-31
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-11
  • 2022-01-16
  • 2021-12-31
  • 2022-01-12
  • 2021-05-12
  • 2021-12-12
相关资源
相似解决方案