Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1939
  • Last Modified:

How to access localhost on Mac through IE browser, that's running on VMWare

I have a website running on a localhost on Mac OS X, that I would like to test in Windows environment, which I'm running on VMWare on the same computer. What is the address, that I should type in the browser, when inside Windows, to view the website, and is there something I need to do on Mac OS in order to enable the access?

The port number, where the website is on localhost, is 8080, in case that makes a difference.
0
leppis75
Asked:
leppis75
  • 10
  • 4
  • 3
  • +2
1 Solution
 
ericnilsCommented:
Access it using the IP address of your mac.  

For example instead of http://localhost:8080/index.html use http://192.168.1.12:8080/index.html

You can find the IP address of your mac in your Network PrefPane or by typing ifconfig at the command line.  If you are using NAT for networking on your virtual machine you may have to change the network configuration of the virtual machine to bonded before this will work.
0
 
Dave BaldwinFixer of ProblemsCommented:
I don't know if it will cross the VM barrier but "http://localhost:8080/" would be the normal syntax.
0
 
leppis75Author Commented:
Both of those cases result in this error:

"The remote device or resource won't accept the connection."

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Dave BaldwinFixer of ProblemsCommented:
It did work when run from your browser on Mac OS, right?  I ask to make sure it's working in the first place.  If not, what URL do you use under Mac OS?
0
 
ericnilsCommented:
What software are you using?  A lot of development environments will only accept connections addressed to localhost by default.  To get it to respond by IP you have to make it available to anyone that can see your computer on the local network.  Make sure your security settings are set up to allow that or you will not be able to access it from the VM.
0
 
leppis75Author Commented:
The http://localhost:8080/folder-name/ works, when I run it from my browser on Mac OS, but the http://ip-address:8080/folder-name/ doesn't work there either.

ericnils:
I'm not sure what you're asking. The website I'm trying to view uses a CMS called Plone (this probably doesn't matter). My Mac operating system is Snow Leopard and my Windows operating system Windows 7. And the software I'm using to run Windows is WMWare.

I'll try to see if I can find the security settings for accessing the IP address.
0
 
leppis75Author Commented:
I think I need to change something in my settings for  Sharing -> Internet sharing.

The options are as follows:

Share your connection from: AirPort / Ethernet / Parallels Host-Only Networking Adapter / Firewire / Parallels Shared Networking Adapter / Bluetooth DUN

And then below:
To computers using:
same options as above



0
 
vmwarun - ArunCommented:
If I understand correctly, you are running VMware Fusion within Mac OS X and have installed Windows 7 as a Virtual Machine. Please correct me if my assumptions are wrong.
0
 
leppis75Author Commented:
Yes, that is correct arunraju.
0
 
ericnilsCommented:
Can you access your web page using the http://ip-address:8080/folder-name/ from another physical computer on your local network?
0
 
leppis75Author Commented:
There's only me, working from home, so I'm afraid I can't test that right now. Maybe tomorrow when I'm at the office.
0
 
leppis75Author Commented:
As you recommended in the other thread, I've now got rid of my Windows 7 virtual machine on VMWare. However, I still have Windows XP Professional running on there.
0
 
vmwarun - ArunCommented:
Please update what mode of networking have you setup for the Virtual Machine. (Bridged / NAT / Host-only)
0
 
leppis75Author Commented:
It's NAT.
0
 
vmwarun - ArunCommented:
I guess the VM has an IP in 192.168.X.X subnet.

The best way to connecting to the host from the VM is by using the syntax : http://:portnumber.

Let me know how it goes.
0
 
ericnilsCommented:
If you change the NAT to Bridged it will almost certainly work.
0
 
leppis75Author Commented:
Arunraju, isn't that the same as this, that was already discussed earlier?
http://ip-address:8080/folder-name/ 

By the IP-address I mean the IP I get for my computer when checking it on the Mac OS.

Ericnils, I tried changing to Bridged, and that didn't do anything.
0
 
jasonalukeCommented:
Actually, your issue probably was that your osx host firewall was blocking traffic to port 8080. You could disable the firewall and retry the http://<ip of mac>:8080 attempt.
0
 
leppis75Author Commented:
I resolved the problem by adding my Mac's IP address to the .../etc/hosts.txt file of the Windows OS. I have to update the IP each time I restart my computer, and sometimes the "connection" between the two stops working without any apparent reason, and only a restart and a new IP will help.
0
 
leppis75Author Commented:
I didn't know who to reward the points to, because I wasn't able to follow any of the instructions and therefore couldn't figure out how or where I should change my settings. The localhost address together with the port number was the correct way to address the location I was trying to view, but I only got it working after finding instructions elsewhere, where I was told to edit the hosts.txt file.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 10
  • 4
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now