Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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" />
share|improve this question
    
Can you show us the output of iptables -L ? –  Zypher Apr 3 '12 at 17:34
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
    
changed as you advised. still i am unable to access tomcat –  Asghar Apr 3 '12 at 14:24
    
I can't see the address attribute in your connector. –  Khaled Apr 3 '12 at 14:24
    
added the address attribute. but still having the same problem.. –  Asghar Apr 3 '12 at 14:30
    
@Asghar Did you restart the service after making the change? Can you confirm which address it's listening on with netstat? –  Shane Madden Apr 3 '12 at 16:29
    
address="0.0.0.0" mean listen on all interfaces –  Zypher Apr 3 '12 at 17:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.