Unable to access Apache VirtualHost website over network

Issues related to configuring your network
Posts: 1
Joined: 2012/04/08 10:43:42

Unable to access Apache VirtualHost website over network

Postby technosj » 2012/04/08 10:49:53

I have two virtual machines setup on VirtualBox. A Linux host (CentOS 5.2) with Apache, MySQL and PHP & another with Windows XP.

The linux system has been configured to host www[dot]xyz[dot]com via VirtualHost (IP: It works perfectly fine and a sample html page pops up when i open www[dot]xyz[dot]com in firefox.

However when i try to open www[dot]xyz[dot]com on Windows XP (, it fails. It says "Couldn't connect to server". I have configured the host file on both linux and windows xp. And both the machines are able to ping each other. I can even ping www[dot]xyz[dot]com on Windows XP and it resolves to (Linux Machine IP).

Firewalls are off on both the systems. I have wasted several days trying to figure out what might be wrong. I even created another linux machine to check if i can open www[dot]xyz[dot]com on the linux but it failed again with the same problem. I was able to ping both of them but i couldn't open www[dot]xyz[dot]com in browser.

Please help me out?

Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Unable to access Apache VirtualHost website over network

Postby pschaff » 2012/04/08 16:39:37

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

First, you should immediately update to the current release 5.8. 5.2 is seriously obsolete and has numerous known bugs and security issues that have been fixed in subsequent updates. Obsolete releases are not supported, nor is it advisable to be running them. See the CentOS 5.6 Release Notes Section 4 for details on the recommended update procedure for such an old release, and CentOS 5.8 Release Notes for other information.

You don't specify the host OS or the type of networking in use for the virtual machines, but if they can ping each other it is likely Bridged. It is not clear where the browser access is working from. Are you certain that Apache is listening on the external interface and not just the local loopback address You could also try temporarily putting SELinux in permissive mode with "setenforce 0" to check if that is a problem.

If more help is needed then please provide more information about your system by running "./getinfo.sh" and showing us the output file. Showing /etc/hosts might also help.