Reach the phone
Quick check: can you say why localhost failed, put the LAN IP on the phone, and restart the server from a two-line runbook?
Pass at 70%. Feedback appears as you go, and only your first answer to each question counts.
Show answer
Answer:
The server is listening on all interfaces, not only loopback. A client that can reach this machine's LAN IP on port 8000 can talk to it.
A full-credit answer shows: A strong answer covers: (1) all interfaces, not just 127.0.0.1; (2) that is why the LAN URL can work.
0.0.0.0 as a bind address is every door. 127.0.0.1 as a bind would have been laptop-only (objective 2).
Sample answer
The server is listening on all interfaces, not only loopback. A client that can reach this machine's LAN IP on port 8000 can talk to it.
A full-credit answer shows
A strong answer covers: (1) all interfaces, not just 127.0.0.1; (2) that is why the LAN URL can work.
0.0.0.0 as a bind address is every door. 127.0.0.1 as a bind would have been laptop-only (objective 2).
Show answer
Answer:
Ports below 1024 are privileged. Port 80 needs extra rights. Port 8000 is above that line, so an ordinary user can bind it.
A full-credit answer shows: A strong answer covers: (1) ports below 1024 are privileged; (2) 80 is in that range; (3) 8000 is not.
The privileged-port line is 1024. That is a Unix convention; on Linux the sysctl default is 1024 (objective 5).
Sample answer
Ports below 1024 are privileged. Port 80 needs extra rights. Port 8000 is above that line, so an ordinary user can bind it.
A full-credit answer shows
A strong answer covers: (1) ports below 1024 are privileged; (2) 80 is in that range; (3) 8000 is not.
The privileged-port line is 1024. That is a Unix convention; on Linux the sysctl default is 1024 (objective 5).
Show answer
Answer:
- Is the server running, in
~/projects/first-site? 2. Is the phone using the LAN IP, not localhost? 3. Then the firewall.
A full-credit answer shows: A strong answer puts server/directory first, then the URL the phone typed, then firewall. Order may swap the first two if both are named before firewall.
Do not start with the firewall. Confirm the server is up and the phone is asking for the laptop, then look at filters (objective 6).
Sample answer
- Is the server running, in
~/projects/first-site? 2. Is the phone using the LAN IP, not localhost? 3. Then the firewall.
A full-credit answer shows
A strong answer puts server/directory first, then the URL the phone typed, then firewall. Order may swap the first two if both are named before firewall.
Do not start with the firewall. Confirm the server is up and the phone is asking for the laptop, then look at filters (objective 6).
Show answer
Answer: True
Start in the right folder on 8000. Stop with Ctrl-C — you should see Keyboard interrupt received, exiting. That is the whole runbook (objective 6).
Start in the right folder on 8000. Stop with Ctrl-C — you should see Keyboard interrupt received, exiting. That is the whole runbook (objective 6).
Show answer
Answer: localhost means the machine that is asking — the phone asked itself
The banner already said 0.0.0.0 — the server was willing. The phone used the wrong name for the laptop (objectives 1, 2).
The banner already said 0.0.0.0 — the server was willing. The phone used the wrong name for the laptop (objectives 1, 2).
Show answer
Answer: http://192.168.1.42:8000
The third address uses the LAN IP and port 8000. localhost and 127.0.0.1 are the phone talking to itself. file:// is not on the network at all (objective 3).
The third address uses the LAN IP and port 8000. localhost and 127.0.0.1 are the phone talking to itself. file:// is not on the network at all (objective 3).