The easiest way to access local sites from a Windows Parallels / VMWare Fusion virtual machine?

  • Create a Rails application on your Mac.
  • A virtual Windows window using Parallels (on the same computer).
  • Want to test it in IE ...
  • ... without deploying it
  • ... or trying to run the Rails environment on Windows

Is there a way to conveniently connect to port 3000 on my Mac from Windows?

+5
source share
3 answers

This should be fairly straightforward (for non-subdomains of Rails applications). This is definitely getting more complicated with subdomains.

Unsupported application

  • From your Mac terminal:

    ifconfig -a

  • Copy the assigned IP address (e.g. 192.168.1.100)

  • Parallels, IE IP- . Rails. :

    http://192.168.1.100:3000

  • ! Rails.

, - lvh.me, (. ASCIICasts 221: Rails 3). , Windows.

  • Windows hosts. - C:\WINDOWS\system32\drivers\etc\hosts

  • , IP- , , , , :

    192.168.1.100 lvh.me sub1.lvh.me sub2.lvh.me ... subN.lvh.me

    sub1, sub2,..., subN - , IE.

http://sub1.lvh.me:3000 IE.

IP- DHCP, OS X Home, DHCP IP-. , , . , . YMMV:)

+13

, , , .

IP- ( v8 9). , , "ping", , .

10.211.55.22

. , ( v9.) , .

  • , .
  • Preferences Parallels Desktop ( VM)
  • Advanced = > Network: [Change Settings]
  • " "

IP

  • " "
  • Para... #0,
  • , IP-. ( )

Parallels Shared Networking Interface Configuration on OS-X

+2

. , , , MAC http://localhost:5000/ Windows ( Parallels), Parallels . . ,

  • ping you IP mac

ifconfig | grep net

enter image description here

  1. ip

: enter image description here

  1. :

, 5000, 5000 ( , , 8000), ip : 10.211.55.2

+1

All Articles