Super User is a question and answer site for computer enthusiasts and power users. 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

my Apache server is running on Windows 7 that is my host OS for CentOs 6.4 running on vmware. In windows 7 i can access web pages (files on server) through, localhost, and alias created of the localhost in the Apache configuration but on CentOs which is my guest os i can access the host's server only through (subnetIp of guest's NAT is, is there any way to access the server from the guest by using the alias created.

share|improve this question
Is DNS resolving works fine on your guest OS? – VL-80 Aug 7 '13 at 14:53
can't tell I am new to this stuff like protocols and vmware – UDB Aug 7 '13 at 15:59
OK. In your CentOS open terminal and execute 'cat /etc/resolv.conf'. After that execute 'nslookup alias_of_apache'. Post outputs of both commands here. – VL-80 Aug 7 '13 at 17:09
# Generated by NetworkManager domain localdomain search localdomain nameserver – UDB Aug 7 '13 at 17:22
;; connection timed out; trying next origin Server: Address: ** server can't find alias_of_apache: NXDOMAIN – UDB Aug 7 '13 at 17:24
up vote 1 down vote accepted

If I understood you correctly than try to do following:

Execute this command in terminal as root (on CentOS):

echo '' >> /etc/hosts

Try to access your web site using this host name. If that works - I will give explanation why it does.

OK. Apparently it works for you. So, what is happening - you are using real hostname from Internet for internal purposes. When you try to access it from CentOS your browser performs DNS lookup procedure.

  1. It asks DNS server - what is IP address of the hostname
  2. And it receives answer from DNS server: The IP address of is
  3. Now your browser connects to IP address which is different from your local web server address.

In order to handle that we just instructed your CentOS that if it needs to communicate with than it should use address

I hope it gives you good explanation.

share|improve this answer
thanks that worked for CentOS, but there is still a problem when i tried to associate the ip address to the alias name by editing host file in windows Xp running on virtual box, browser in xp failed to connect after timeout – UDB Aug 7 '13 at 19:48
all problems cleared just used name require as alias for default gateway on xp obtained by ipconfig command into the host file. thanks again – UDB Aug 7 '13 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .