BM: Baca dalam Bahasa Melayu
World L2: Keys & Staff · Boss challenge
The service that won't start
You will learn: to bring a broken web server back on your own: status, logs, fix, test, start.
Checked with Linux (Debian 13) on 1 Nov 2026
The problem
Boss: Monday, 8 am. Customers say the menu site is down. You try curl -sS localhost and get curl: (7) Failed to connect to localhost port 80 after 0 ms: Could not connect to server. Where do you look first?
Pick one answer.
Try it
Step 1: ask the shift manager if nginx is working. Then read its diary.
You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx failed.
you@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxfailedstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd
Hint
The red light in Services also says failed.Check
Step 2: tap the line that names the real problem.
0 of 1 found
Try it
Step 3: fix the typo, then test the settings: sudo sed -i 's/lisen/listen/' /etc/nginx/sites-available/default, then sudo nginx -t.
You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx failed.
you@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxfailedstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd
Hint
sed -i 's/old/new/' file swaps a word inside the file itself.Predict
nginx -t says test is successful. Is the menu site back now?
Pick one answer.
Try it
Step 4: the settings are fixed. Start nginx, then check the page like a customer would.
You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx failed.
you@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxfailedstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd
Hint
Watch the light turn green.Check
Write the “won’t start” ladder for the next person on shift.
First step at the top. Put these in order. Use the arrows, or drag.
- sudo journalctl -u: why did it stop?
- systemctl is-active or status: what does systemd say?
- curl: is it really down?
- Fix the file, then test it (nginx -t)
- sudo systemctl start, then curl again
You did it!
You can now bring a broken service back on your own.
Go deeper (optional)
The same ladder works for any service: ssh, cron, a database. Many programs have their own test, like nginx -t. Fixed it? sudo systemctl enable nginx makes sure it also comes back after a reboot.
Real rep (optional), only on a throwaway VM with nginx installed:
Real mission
sudo sed -i 's/listen 80/lisen 80/' /etc/nginx/sites-available/defaultsudo systemctl restart nginxsudo journalctl -u nginx -n 5sudo sed -i 's/lisen 80/listen 80/' /etc/nginx/sites-available/defaultsudo nginx -t && sudo systemctl restart nginx
0 of 5 steps done · Your ticks are saved.
Bahasa Melayu
Boss: Isnin, 8 pagi. Pelanggan kata laman menu tak boleh dibuka. Anda cuba curl -sS localhost dan dapat curl: (7) Failed to connect to localhost port 80 after 0 ms: Could not connect to server. Di mana anda tengok dulu?
Langkah 1: tanya pengurus syif sama ada nginx bekerja. Kemudian baca diarinya.
Langkah 3: baiki salah taip itu, kemudian uji tetapan: sudo sed -i 's/lisen/listen/' /etc/nginx/sites-available/default, kemudian sudo nginx -t.
sed -i 's/lama/baru/' fail tukar satu perkataan di dalam fail itu sendiri.nginx -t kata test is successful. Adakah laman menu sudah kembali?
Langkah 4: tetapan sudah dibaiki. Mulakan nginx, kemudian semak laman itu macam pelanggan.
Tulis tangga “tak mahu hidup” untuk orang syif seterusnya.
Kini anda boleh hidupkan semula servis yang rosak sendiri.
You finished this before. Practice is always welcome!
Official docs: systemctl (Debian 13 man page) · journalctl (Debian 13 man page) · sed (Debian 13 man page) · nginx: command-line parameters (nginx -t) · nginx: core module (listen)
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?