On my CentOS virtual machine I set up an Apache server. I followed this link: How to set up Apache server.
Then everything worked fine as expected; however,
when I removed the
example.com entry from the
/etc/hosts file, I expected it to reach for
/var/www/html instead of
example.com still however it still reached only for
example.com index html when I reach for my local IP address.
I just want to understand when should it prefer to reach out for folders like
example.com and leave out
It confused me a bit. I want to know when is this one used and when is the other used as in