About IP 0.0.0.0 in Django
0.0.0.0:80
is a shortcut meaning "bind to all IP addresses this computer supports". 127.0.0.1:80
makes it bind only to the "lo" or "loopback" interface. If you have just one NIC with just one IP address, you could bind to it explicitly with, say, 192.168.1.1:80
(if 192.168.1.1
was your IP address), or you could list all the IPs your computer responds to, but 0.0.0.0:80
is a shortcut for that.
127.0.0.1 is the loopback interface, also known as localhost
; this is an address that is only accessible from the same computer, as nothing actually goes over the network. 0.0.0.0 means "listen on all interfaces", and thus will listen for connections on all IP addresses that machine has (likely only one).
127.0.0.1 is the local (loopback) ip, not the ip of that computer on the network. To access a server across the network, you'll need to know its' network ip