Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: [SOLVED] Virtualbox accessing ubuntu localhost

  1. #1
    Join Date
    Jan 2008
    Beans
    40

    [SOLVED] Virtualbox accessing ubuntu localhost

    hi,
    I got Ubuntu 7.10 and WinXP with Virtualbox.
    Is there a way to access the localhost of Ubuntu in the WinXP, without beeing in an network?
    My Problem is:
    I want to do some webstuff. So I installed apache on my Ubunutu. There I can access my stuff by using: localhost/~okar/stuff.. Can I somehow access these things on my WinXP.

    Thanks in advance

  2. #2
    Join Date
    May 2007
    Beans
    7,032
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Virtualbox accessing ubuntu localhost

    Yes, you can, but not using localhost. You'll need to get the IP address that your Ubuntu Apache server is listening on, and then enter that to connect from XP. You can get the correct address by running this:
    Code:
    ifconfig -a
    The "inet address" will be the number you want to enter into your browser in XP.
    I am aware of all internet traditions. | Getting the best help | Text formatting codes | My last.fm profile
    Should I PM support questions? NO!

  3. #3
    Join Date
    Jan 2008
    Beans
    40

    Re: Virtualbox accessing ubuntu localhost

    ok thanks.
    but this only works if I'm connected to a network. Is there a possibility to achieve the same without being in a network?

  4. #4
    Join Date
    Aug 2005
    Beans
    380

    Re: Virtualbox accessing ubuntu localhost

    From memory, if you have set up VirtualBox with NAT networking, I think you can access services running on the host from the guest OS. From the guest (WinXP), the host appears as 10.0.2.2. So if you point your WinXP web browser to that address, it should connect to your Ubuntu Apache server. (To the host, this appears to be a connection from localhost, I believe.)

  5. #5
    Join Date
    Jan 2008
    Beans
    40

    Re: Virtualbox accessing ubuntu localhost

    hey nice, that was what I was looking for.
    thank you very very much

  6. #6
    Join Date
    Oct 2007
    Beans
    6

    Question Re: [SOLVED] Virtualbox accessing ubuntu localhost

    I'm not having any luck with the ideas offered here. I have a WinXP guest running in VBox 1.5.6 in Ubuntu 8.04. There is a network adapater using NAT (the default, I believe). I network fine withing WinXP but cannot access the Apache2 server running in Ubuntu.

    I tried:
    * the IP address offered by ifconfig -a
    * 10.0.0.2
    * the tips offered at http://herbee.fr/?q=VirtualBox-NAT (see my comments at the bottom)

    It would be very cool if I could get this working so I would only have to maintain 1 version of Apache2 for Windows browser testing (instead of installing/maintaining a duplicate setup within Windows).

    Any ideas?

    thx
    a

  7. #7
    Join Date
    Jan 2008
    Beans
    40

    Re: [SOLVED] Virtualbox accessing ubuntu localhost

    did you try 10.0.0.2 or 10.0.2.2? because the latter is the right one.

  8. #8
    Join Date
    Dec 2006
    Beans
    45

    Re: [SOLVED] Virtualbox accessing ubuntu localhost

    Wow, this is really nice work !

  9. #9
    Join Date
    May 2007
    Beans
    1

    Re: [SOLVED] Virtualbox accessing ubuntu localhost

    10.0.2.2
    this is what I was looking for

  10. #10
    Join Date
    Jul 2009
    Beans
    2

    Re: [SOLVED] Virtualbox accessing ubuntu localhost

    Perfect. Much better than run ifconfig everytime I get a new IP address. thank you!

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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