If you have finished updating the information of the config file, you need to ask nginx to reload to run on the latest config information.
There are 2 methods for you to Reload Configuration Files
Method 1:
sudo systemctl restart nginx
Method 2:
sudo nginx -s reload
Once the above command is executed, we can check the server information has been updated or not by the following command
curl -i http://nglearns.test
# HTTP/1.1 200 OK
# Server: nginx/1.18.0 (Ubuntu)
# Date: Wed, 21 Apr 2024 12:08:33 GMT
# Content-Type: text/plain
# Content-Length: 18
# Connection: keep-alive
# Helo
Here, we can see that the server has returned status 200 with the message "Hello" according to what we have configured in the previous steps.