[Solved] Bridged networking - SSH works, Apache does not.

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
grekker
Posts: 2
Joined: 23. Jun 2010, 04:36
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: CentOS

[Solved] Bridged networking - SSH works, Apache does not.

Post by grekker »

Problem in a nutshell
I cannot connect to the apache server on my guest operating system from my host operating system.

Background
I have a Mac OS X Snow Leopard host running a CentOS 5.5 guest operating system, fresh install on the CentOS (Apache 2, PHP 5.3, MySQL 5.1).

I have the httpd and mysqld services up and running, and from the guest I can browse to localhost and see the web server correctly displaying my PHP index file.

I have two network adapters set up, both Bridged Networking, one is ethernet the other is airport (wireless). Currently I am connected to the internet via the wireless one.

There is a wireless DHCP router on the network. My Macbook Pro is getting 192.168.1.102 assigned to it for an IP, and when I check the IP inside CentOS it shows as 192.168.1.103. All good so far.

From the host OS terminal I can ping 192.168.1.103 and I get a legitimate exchange of packets.

I can also ssh from the command line into 192.168.1.103, and that works. I can browse around the guest OS and see all its files, etc.

However, here is where things break down. When I go to 192.168.1.103 in a web browser on my host, the page can't be found. If I curl from my host OS command line, I get the error: curl: (7) couldn't connect to host

Final Thoughts
Frankly, I'm a bit baffled at this point. I've played around with various things with no luck. The part that confuses me is that ping and SSH work, but trying to hit the apache server does not. Weird. Would it be possible that my apache is somehow not allowing external connections? It's a vanilla install with almost no changes.

Hoping one of you folks might have an inkling what's going on here.

Thanks in advance for your help!
Last edited by grekker on 23. Jun 2010, 05:43, edited 1 time in total.
grekker
Posts: 2
Joined: 23. Jun 2010, 04:36
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: CentOS

Re: Bridged networking - SSH works, Apache does not. Thoughts?

Post by grekker »

Solved.

This was caused by the configuration of the Security Level Configuration Tool in CentOS.

WWW (HTTP) was not checked off as trusted.

For more details, see http://www.centos.org/docs/4/html/rhel- ... ewall.html.

Hope this helps someone down the road!
ilusi
Posts: 1
Joined: 5. Jul 2010, 17:37
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: win 7, centos

Re: [Solved] Bridged networking - SSH works, Apache does not.

Post by ilusi »

Hi, would you mind sharing the installation procedures or pointing me to the right resources? I'm also running Mac OS X Snow Leopard host, VB 3.2.4, and have been trying to install CentOS 5.5 as guest system. The installation has been crashing after I selected "Server" when choosing what type of software to install... (other options are like "Desktop - GNOME", etc.).

My goal is to have LAMP running on CentOS and setup virtual host, like, local.domain.com on the host.

Thanks so much if you can help. I haven't been lucky enough googling for good results.
Post Reply