Linux Labs

Networking / Stage 13 of 14

Restore a service from client to answer

Not running Starting usually ~20 s
Leave the lesson

Step 4 of 7 · theory · 4 min

When the restore is complete

The site answered — but the job is done only if the right request got the answer and the service is still in good shape.

An end-to-end check is the request the real client makes: from its machine, by the same name and port, without temporary props like curl --resolve. The answer is the right page: a foreign page can return 200 too.

The service must keep working: the configuration passes nginx -t, the service is active, and what runs is what is in the file. A fix that lasts only until the next restart brings the fault back.

At the start of the lesson the filter was removed entirely — fine on a practice machine. On a production server you delete the one rule in the way and keep the other restrictions.

Check yourself 1 question

Which result shows that the site is restored?

  • In the exercise reload reported success while nginx stayed on the old address. The result shows in ss and in the answer to the client.

  • --resolve supplies the address for one run. A plain request by name may still fail.

  • That is a check from the inside: it would pass with the listener on 127.0.0.1 too. The client is lab-node1.

A request from the real client by the same name and port confirms the restoration. Along with it you check the service: nginx -t and systemctl is-active.

Key points

  • A request from the real client confirms the restore; a check on the server itself does not replace it.
  • After the fix the service passes nginx -t, runs, and runs from the file on disk.
Ubuntu 24.04
Loading…