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.
Which result shows that the site is restored?
-
In the exercise
reloadreported success while nginx stayed on the old address. The result shows inssand in the answer to the client. -
--resolvesupplies 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.1too. The client islab-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.