Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in our office, we have a web application running. When we access the application by the domain name, it will display the current version of application.

However, when we go by the IP address, it will display the old version of that application. One thing is that we can access that application either by (it will be redirected to the long URL automatically) or when we are using domain name.

But only accessible via the exact URL when we use IP address. Why is it showing the old version and how can it be corrected? It is running JRun4, Apache on Red hat. I've checked in httpd.conf a bit but could not find any. Please advice what should be done to display the same (updated version) when we access using domain name or IP address. Thank you.

share|improve this question
what ip is reported by the command host – Serge Oct 12 '12 at 2:48
I am only using windows. if host command is similar to nslookup, the IP I get is – h82 Oct 12 '12 at 6:18

It most likely has to do with your name-based virtual host (vhost) configuration. When accessing your web server using your domain name, the web server finds the vhost configured with that domain name. Accessing it by IP address, the web server uses the default (_default_ in Apache) vhost.

Search your Apache configuration for <VirtualHost ...> blocks.

share|improve this answer
In my httpd.conf, 3 VirtualHost are associated to that IP address. The first VirtualHost entry is When I tried, it displayed the same page like the Is there a way to change in httpd.conf so that domain and IP access display the same content? – h82 Oct 12 '12 at 6:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.