6

I have tomcat5 installed on CentOS. which is configured to listen only from 127.0.0.1. How do I configure Tomcat to listen from all interfaces.

Connector port config is as under:

 <Connector port="8080" protocol="HTTP/1.1" 
       connectionTimeout="20000" 
       URIEncoding="UTF-8"
       address="0.0.0.0"
       redirectPort="8443" />
Magellan
  • 4,451
  • 3
  • 30
  • 53
Asghar
  • 203
  • 1
  • 6
  • 14

1 Answers1

7

You need to change the connector stanza in your server.xml file.

<Connector port="8080" protocol="HTTP/1.1" 
           connectionTimeout="20000" 
           URIEncoding="UTF-8"
           address="0.0.0.0"
           redirectPort="8443" />

You need to add/change the address attribute. Don't forget to restart your tomcat server after that.

Khaled
  • 36,533
  • 8
  • 72
  • 99