VPN & Mac Apache Virtual Hosts

Discussion in 'Installation and Configuration of Parallels Desktop' started by WalterC, Mar 30, 2011.

  1. WalterC

    WalterC Bit poster

    Messages:
    2
    I work for a major software corporation as an interaction designer. I do some frontend HTML-based UI designing / coding, so I use Parallels to test everything and ensure it works in Windows web browsers. I work on multiple projects, so I have Mac's Apache configured to have a separate virtual host for everything I work on (e.g. projectA.localhost, projectB.localhost). This is set up by configuring my hosts file so that each virtual host has its own line:

    127.0.0.1 projectA.localhost
    127.0.0.1 projectB.localhost

    Under Parallels, I can replicate this behavior by enabling shared networking and pointing the same URLs in the Windows hosts file to the machine's virtual IP address.

    10.211.55.2 projectA.localhost
    10.211.55.2 projectB.localhost

    This works great, except I work remotely and rightfully so, the company requires I connect through a VPN in order to sync source code and connect to internal servers for testing purposes. When I connect to the VPN, I'm no longer able to access my local sites in Parallels using the virtual machine's IP address. The error I get is just, "Internet Explorer cannot display the webpage".

    HOWEVER, if I connect to my Mac's IP address (e.g. 192.168.1.78), I'm able to connect to Apache. I can also connect to internal websites that require a VPN connection.

    One fix is to fill my Mac's IP address into the Windows hosts file, but the IP address changes frequently and it's a real pain having to open the hosts file and change all the IP addresses.

    Any guidance, or help?
     

Share This Page