We help IT Professionals succeed at work.

access website on public IP from same server

Bes4dmin asked
Hi I have a drupal site running on IIS. The server have a private IP adress
This IP is mapped to a public IP on the firewall. So external users can access the website on the public address.
The problem is that from the server itself, I can't access http://www.examplesite.com or the public IP. I can only access the website by going to http://localhost

Drupal is behaving strange and the drupal guys is telling me that the website should be accessed only on the domain address www.examplesite.com
How do I accomplish this? nslookup shows the correct IP-domain translation
Watch Question

The issue here is that DNS is giving a public IP address which leads the server to go out of the network but then gets directed back into the network which the firewall won't allow (hairpinning).

Solution; add www.examplesite.com to the HOSTS file on the server itself (to prevent the external lookup).

Add the following line to the HOSTS file on the Windows server:


off course