Step 7 of 8 · lab · 15 min
Fix nginx
The nginx site stopped opening after yesterday's work. Find the cause and bring the site back.
Situation
The server ran a website on nginx. After yesterday's work on the server the site stopped
opening: curl http://localhost/ says Couldn't connect to server. Nobody remembers what exactly
was changed.
Task
- The default site answers at
http://localhost/with status 200 again. - nginx runs as a systemd service, and its configuration passes the
nginx -tcheck. - The default site — the file
/etc/nginx/sites-enabled/defaultand itslistenlines — stays in place: fix the error rather than work around it.
The tools you need (nginx, curl) are already installed. There is no internet on this machine.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 4-
The nginx configuration passes
nginx -t— not done yet -
The nginx service is active — not done yet
-
http://localhost/ returns HTTP 200 — not done yet
-
The default site is still in place — not done yet
Ctrl+Enter
Starts the machine node1 · Ubuntu 24.04
The machine is starting
Hints
0 of 3Lab goals
0 of 4-
The nginx configuration passes
nginx -t— not done yet -
The nginx service is active — not done yet
-
http://localhost/ returns HTTP 200 — not done yet
-
The default site is still in place — not done yet
Goals are checked on the machine after every command.