Understanding the default Nginx virtual host (or server) configuration
After you had installed Nginx, one of the first thing to do is to check whether it is running ok.
One way to do so is to use your browser to send a HTTP request to test it.
If you had installed Nginx on your local machine, then you may enter http://localhost or http://127.0.0.1 into the location bar of your browser.
When you had setup Nginx on a separate machine on your home network, you may also enter http://<ip_address_of_the_machine> in the location bar of your browser. For example, in how to host a WordPress website on a Raspberry Pi with Raspbian Buster Lite and Nginx, I had entered http://192.168.1.114 as the location to test out the Nginx server running on my Raspberry Pi.
So be it http://localhost, http://127.0.0.1, http://<ip_address_of_the_machine>, you will always see this page on your browser screen:
In case you are wondering why your Nginx behaves this way, this post will explain what the default Nginx Virtual Host configuration does to Nginx.
Follow us