Solved

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

Posted on 2010-09-09
20
1,673 Views
Last Modified: 2012-05-10
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
Comment
Question by:leppis75
  • 10
  • 4
  • 3
  • +2
20 Comments
 
LVL 4

Expert Comment

by:ericnils
ID: 33639071
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
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 33639075
I don't know if it will cross the VM barrier but "http://localhost:8080/" would be the normal syntax.
0
 

Author Comment

by:leppis75
ID: 33639172
Both of those cases result in this error:

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

0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 33639207
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
 
LVL 4

Expert Comment

by:ericnils
ID: 33639294
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
 

Author Comment

by:leppis75
ID: 33639418
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
 

Author Comment

by:leppis75
ID: 33639509
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
 
LVL 19

Expert Comment

by:vmwarun - Arun
ID: 33639528
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
 

Author Comment

by:leppis75
ID: 33639595
Yes, that is correct arunraju.
0
 
LVL 4

Expert Comment

by:ericnils
ID: 33640352
Can you access your web page using the http://ip-address:8080/folder-name/ from another physical computer on your local network?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:leppis75
ID: 33640532
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
 

Author Comment

by:leppis75
ID: 33640760
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
 
LVL 19

Expert Comment

by:vmwarun - Arun
ID: 33640989
Please update what mode of networking have you setup for the Virtual Machine. (Bridged / NAT / Host-only)
0
 

Author Comment

by:leppis75
ID: 33641816
It's NAT.
0
 
LVL 19

Expert Comment

by:vmwarun - Arun
ID: 33642053
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
 
LVL 4

Expert Comment

by:ericnils
ID: 33642135
If you change the NAT to Bridged it will almost certainly work.
0
 

Author Comment

by:leppis75
ID: 33643695
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
 
LVL 2

Expert Comment

by:jasonaluke
ID: 33878264
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
 

Accepted Solution

by:
leppis75 earned 0 total points
ID: 33994194
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
 

Author Closing Comment

by:leppis75
ID: 34026868
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Using a software based iSCSI solution, there is no requirement to purchase a hardware iSCSI initiator or TOE (TCP/IP Offload Engine) interface card. A standard network interface card can be used to connect an existing ESXi server to a remote iSCSI t…
Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
Teach the user how to install ESXi 5.5 and configure the management network System Requirements: ESXi Installation:  Management Network Configuration: Management Network Testing:
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now