0

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

However, when we go by the IP address, http://192.168.1.111/application/name it will display the old version of that application. One thing is that we can access that application either by http://server.domain.com/ (it will be redirected to the long URL automatically) or http://server.domain.com/application/name 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.

ht2
  • 61
  • 1
  • 1
  • 4

1 Answers1

0

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.

Philip
  • 801
  • 6
  • 10
  • In my httpd.conf, 3 VirtualHost are associated to that IP address. The first VirtualHost entry is `another.domain.com`. When I tried `http://another.domain.com/application/name`, it displayed the same page like the `http://192.168.1.111/application/name`. Is there a way to change in httpd.conf so that domain and IP access display the same content? – ht2 Oct 12 '12 at 06:45