can't access website by ip but I can access by fully qualified domain
So it seems I can't browse a website by IP, but I can browse using it's hostname.
C:\Users\c>nslookup www.example.com
Non-authoritative answer:
Name: cx-cdn-bre.gss.consultix.net
Addresses: 62.168.203.241
62.168.202.241
Trying to access 62.168.203.241 is displaying an "nginx Internal Server Error" But if I access www.example.com, the page loads. How is this possible?
There are a variety of reasons this might be the case. Here are just a couple:
host headers - In short, the webserver might host multiple websites on a single IP address. Without the domain name, it cannot display the proper website.
load balancing or similar device - the IP address might not be for a website, but to a load balancer, which distributes network load to other devices.
name resolution - the name resolution to IP had been changed. For example, let's say the website's address has changed and you manually entered it into your HOSTS file to go to the proper IP.
Apache and nginx both (not sure about others....) can serve multiple sites from the same IP based on the host name that is used to connect and request the file(s).
But when you access the server via the IP address, there must be a virtual host defined to service the name used (the IP). The fact that the server is generating an error indicates that there is something "wrong" on the server's config - either it isn't set up to respond to the IP at all, or if it is responding and serving up a PHP or other script that script has issues of some type.