I have been trying to figure out how to setup my VMware Fusion so that it will be able to access http://localhost:8888 on my Mac.
I have editted: c:WINDOWSsystem32driversetchosts to something like this:
But still it won’t resolve to the MAMP pages. After doing some reading, I found out that I can’t use “localhost”. SO I re-editted the hosts file to something like this:
Now, http://mylocalhost:8888 works! BUT I am not totally satisfied. In my applications, I have set a “cofig” variable for the web URL. Something like:
$web_url = "http://localhost:8888/myapp/index";
This would suck for me because I have VMWare Fusion to test CSS between browsers. By the looks of it, I would have to change my variable in order for my web app to work properly.
Do you guys have any ideas on how to use http://localhost from WindowsXP(VMWare) – so that my MAMP Pages will be accessible?
I am currently looking for the same solution. I have mamp set up with virtual host so I can use names like site.dev and testing.dev. I would like to access them the same in xp via vmware.
Michael, when you find the solution post it here
I’ll continue to ask around during the weekend. Very busy at the moment
Couldn’t you use the following:
$base_url = “http://”.$_SERVER['HTTP_HOST'].”:”.$_SERVER['SERVER_PORT'].”/myapp/index”;
That way no matter where you’re page is called from, those SERVER variables will change autonomously.
@Pharalia: thanks ^_^
Just thought I would share a solution I found a while back. http://communities.vmware.com/thread/125707
the third comment down by brianriceca. This worked perfectly for me. Hope it helps.
I also have mamp setup so that apache is using port 80 not 8888 and added virtual hosts in httpd.conf and edited /etc/hosts to include my virtual hosts at localhost.
Thanks for sharing Michael!
http://XXX.XXX.XXX.XXX:8888/ where “XXX.XXX.XXX.XXX” is the IP address of my Mac works fine for me.
The solution I found is quite simple, but may require the latest version (3) of Fusion:
1. In the VM settings for the Windows VM, make network mode NAT
2. figure out what name you laptop is. In my case it’s craigs-macbook.local
3. in Windows, with NAT turned on, you should be able to access the host OS with that name.
This method works regardless of the currently assigned ip address of the host…