Rust hyper server in production inaccessible

#1

I have the following hyper hello server deployed to a AWS linux instance:

I also have the following Python 2 script for comparison:

import SimpleHTTPServer
import SocketServer

PORT = 3000

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()

The python server is accessible from the internet whereas the Rust hyper server refuses to connect.
There’s no problem with the firewall. Ports are accessible on the system.

What am I missing here?

#2

The Rust server is binding to 127.0.0.1, which is only available through the loopback interface, not over the Internet. You probably want to bind to 0.0.0.0 instead, which will be accessible through any network interface.

#3

Silly me, focusing on learning so many things that I forgot about this basic convention. Thanks!