topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 7:23 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: how the hell do i access a xampp virtual host from inside vmware RESOLVED.  (Read 8957 times)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
this is driving me around the bend. i'm i'm assuming it's a simple solution.

i've got XAMPP running a virtual host site on my PC (so i can test things with the site).

so, as it's a 'virtual host' i can access this site with something like "http://www.madeupname.com" from my PC.

this bit all works perfectly fine.

the problem is, how to access this same virtual host site from inside VMWare?

i can access NON virtual host sites that XAMPP is running, i.e. i can access anything in the 'htdocs' folder of XAMPP when accessing it from within VMWare using http://192.168.0.1

i just don't seem to be able to figure out how to access the virtual hosts XAMPP is running - i thought i'd just be able to do something like "http://192.168.0.1/www.madeupname.com"

can't find any explanation online but then i ain't got a clue if i'm trying to do something that's not possible - seems like a simple enough thing to expect to work to me though.

any help, please?
« Last Edit: May 15, 2009, 04:01 PM by nudone »

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
i've now got this working.

inside the virtual machine's hosts file, just add the ip of your main hosting machine (the one with xampp on it).

so, if you've got a virtual host inside xampp called "testingsite" and your host machine's ip is 123.123.123.123, then stick this line in the hosts file of your virtual machine:

123.123.123.123  testingsite

so, in the virtual machine's browser you'd access this xampp virtual host with http://testingsite

note: this is just the bit to get things to work inside a virtual machine. there are other steps required to set up the virtual hosts in xampp.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
I haven't tried it but if your VMWare machine is using NAT networking the simplest solution is to go to the webpage http:\\hostmachinename\testingsite

This works across my network fine and in theory at least NAT based VM machines should just appear as separate machines on the main network.

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
i'm pleased relieved to say that doesn't work (otherwise i've been wasting my time for longer than i'd like to say to figure it out).

this works to access the htdocs folder on the host machine...

http://hostmachinename/

but that isn't what i'm after.

http:/hostmachinename/testingsite doesn't acces the virtual host site either - doesn't seem to do anything.

i don't think it's that simple when using the virtual hosts in xampp. i'm using it so these kind of urls will work

http://testsite or http://www.testsite.com

rather than http://localhost/testsite

(i'm using NAT.)
« Last Edit: May 17, 2009, 01:36 AM by nudone »