01 / 08
Behind an address there are doors
At the end of the last lesson there was this.
ping comes back -> but the site will not showThe answer is doors.
One machine has a great many doors on it.
the building at 127.0.0.1 |- door 22 ... the way in from far away |- door 80 ... the web |- door 3306 ... a database +- door 8080 ... something you stood up yourselfThese numbers are called ports.
address which buildingport which door of that buildingWithout both, nothing arrives. Knowing the address of a block of flats does not let you hand over a parcel without the flat number.
Written out, they go side by side.
127.0.0.1:8080+---+---+ +-++ address doorThe same in a URL.
http://127.0.0.1:8080/https://example.com/ <- 443 is left outhttp://example.com/ <- 80 is left outYou just do not write it usually; a door number is always used.
And here is the crux.
> A door does not open unless somebody is waiting on the inside
The machine may be alive, but with nobody waiting you cannot go in. A ping coming back with nothing usable is exactly this state.
netstat is what lists it.