Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    n00b admin: VirtualBox apache webserver; cannot localhost 8888

    I have installed VirtualBox on a MacBook and installed RHEL6 on a guest server ("Orion") in VirtualBox.

    I am trying to follow the tutorial at xenocafe on Apache Web Server Tutorial for Linux.

    I've checked a few other websites for port forwarding, and have used VBoxManage to set
    Apache/GuestPort" 80
    Apache/HostPort" 8888
    Apache/Protocol" TCP
    ssh/GuestPort" 22
    ssh/HostPort" 2222
    ssh/Protocol" TCP

    I am able to ssh into the Virtual Box guest server using:
    $ ssh -l rmt1 -p 2222 localhost
    I believe this means that the port forwarding works.

    I am able to start and stop httpd on the guest with no warnings. I retired a problem with DocumentRoot by setting SELinus to disabled.

    My trouble is that:

    When I bring up a browser on the host and try localhost 8888 and expect to see my sample html page housed on the guest server (located under root / www), what I get is a spinning wheel.

    And when I bring up a browser on the guest and try localhost 80 and expect to see the sample page I made, what I get is the well-known Apache test page.

    I am stuck in knowing (1) how to cause port 80 output from the guest to be interpreted by the host browser searching port 8888 (Or, Why does ssh into the guest work but http out of the guest not work), and, (2) how to arbitrarily determine the location of what the very first webpage is that will be loaded.

    What info can I get to help diagnose this? Thanks!

  2. #2
    As to not being able to connect to your guest webserver from your host: Have you tried disabling the firewall on your VM?
    service iptables stop
    If that is your problem, you could add a firewall rule to allow that port out - or just leave it off.

    As to not seeing your custom webpage from within your guest: have you properly set the DocumentRoot value in both places in your httpd.conf file?

  3. #3

    I turned off the firewall and coordinated all the references to DocumentRoot. (These tips were not explicitly given in the tutorial.) Then I turned on guest firewall and added a rule for tcp 80. Now I can reboot and my sample page comes up fine.


  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts