Unable to access Apache VirtualHost website over network

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

Unable to access Apache VirtualHost website over network

Post by 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: 192.168.56.2). 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 (192.168.56.10), 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 192.168.56.2 (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?

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

Unable to access Apache VirtualHost website over network

Post by 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 [b][i]seriously[/i][/b] 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 [url=http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.6]CentOS 5.6 Release Notes[/url] Section 4 for details on the recommended update procedure for such an old release, and [url=http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.8]CentOS 5.8 Release Notes[/url] 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 127.0.0.1? 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 [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=28723&forum=54]provide more information about your system[/url] by running "./getinfo.sh" and showing us the output file. Showing /etc/hosts might also help.

Post Reply