<p>How do you configure tomcat to bind to a single ip address (localhost) instead of all addresses?</p>

[{'answer_id': 18623, 'author': 'ScArcher2', 'author_id': 1310, 'author_profile': 'https://Stackoverflow.com/users/1310', 'pm_score': 8, 'selected': True, 'text': '<p>Several connectors are configured, and each connector has an optional "address" attribute where you can set the IP address.</p>\n\n<ol>\n<li>Edit <code>tomcat/conf/server.xml</code>.</li>\n<li>Specify a bind address for that connector: <pre>\n&lt;Connector \n    port="8080" \n    protocol="HTTP/1.1" \n    address="127.0.0.1"\n    connectionTimeout="20000" \n    redirectPort="8443" \n  /&gt;\n</pre></li>\n</ol>\n'}, {'answer_id': 16759608, 'author': 'rnglbd', 'author_id': 1977707, 'author_profile': 'https://Stackoverflow.com/users/1977707', 'pm_score': 4, 'selected': False, 'text': '<p>it\'s well documented here:</p>\n\n<p><a href="https://cwiki.apache.org/confluence/display/TOMCAT/Connectors#Connectors-Q6" rel="nofollow noreferrer">https://cwiki.apache.org/confluence/display/TOMCAT/Connectors#Connectors-Q6</a></p>\n\n<p><em>How do I bind to a specific ip address?</em> - <em>"Each Connector element allows an address property. See the HTTP Connector docs or the AJP Connector docs"</em>. And HTTP Connectors docs:</p>\n\n<p><a href="http://tomcat.apache.org/tomcat-7.0-doc/config/http.html" rel="nofollow noreferrer">http://tomcat.apache.org/tomcat-7.0-doc/config/http.html</a></p>\n\n<p>Standard Implementation -> address</p>\n\n<p><em>"For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified port. By default, this port will be used on all IP addresses associated with the server."</em></p>\n'}, {'answer_id': 20692672, 'author': 'Hal50000', 'author_id': 2296615, 'author_profile': 'https://Stackoverflow.com/users/2296615', 'pm_score': 2, 'selected': False, 'text': "<p>It may be worth mentioning that running tomcat as a non root user (which you should be doing) will prevent you from using a port below 1024 on *nix. If you want to use TC as a standalone server -- as its performance no longer requires it to be fronted by Apache or the like -- you'll want to bind to port 80 along with whatever IP address you're specifying. </p>\n\n<p>You can do this by using IPTABLES to redirect port 80 to 8080.</p>\n"}]
['https://Stackoverflow.com/questions/18617', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1310/']