Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am having problem with accessing Virtual Hosts (located on my Mac) from XP installed via Parallels.

Here's the setup:

  • Mac OS X 10.6.6
    • using pre-installed apache running via Web Sharing (not using MAMP!)
    • several virtual hosts set in apache's config
  • Parallels 6
  • Windows XP Pro 64bit installed via Parallels
    • Network setup set to Shared
    • virtual hosts from Mac added to C:\Windows\system32\drivers\etc\hosts file

Pinging gateway (Mac) from Windows seems to work just fine, but cannot access websites hosted on it - neither by directly accessing IP nor by VHosts.

Turning off firewall didn't seem to help.

What am I doing wrong?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

Assuming there are no firewall issues, it may be worth double checking that you are using the correct IP address to connect to your Mac. When using Shared Networking, Parallels creates a separate sub-network that is used between Parallels and your Mac. As such, your Mac will be using a different IP address to communicate with Parallels than it will to communicate with your external/local network.

Here is an example configuration:

Mac

  • Local Network IP: 192.168.1.10
  • Parallels Network IP: 10.211.55.2

Parallels

  • Parallels Network IP: 10.211.55.3

Network

  • Parallels Default Gateway: 10.211.55.1

Because all of these IPs are non-routable, attempts to connect to your Mac using the 192.168.1.10 address will fail from Parallels. You will need to use the 10.211.55.2 address to connect to your Mac. Note that this is not the same as the Gateway address.

It is also worth pointing out that the IP address for the Parallels network is assigned via DHCP and has the potential to change. This means that you would need to change the entries in your hosts file.*

And finally, make sure that Apache is listening on the Parallels Network IP address. The default configuration should listen on all ports, but would be worth checking if you have changed the Apache configuration.

*There are instructions here to change the Parallels network adapter on the Mac to use a specific address, but this is for Tiger.

share|improve this answer
    
Yeah, I understand how routing works when using Shared Networking. In my case the Mac's Parrallels Network IP is 10.113.113.1 and Parallels Windows Client Network IP is 10.113.113.100. From Windows client I am trying to access 10.113.113.1 and it's a no go :( –  Michal M Mar 17 '11 at 13:00
    
On mine, I have separate IP for the gateway and for the Mac. Can you use ifconfig in Terminal to see if your Mac has another IP on that sub-network? –  g . Mar 17 '11 at 13:34
    
That is correct!!! Thank you very much indeed. I thought it was kinda obvious it'd use the same one but it doesn't! In my case gateway is 10.113.113.1 and Mac (apache) is 10.113.113.2. Much appreciated! Add this tip to you answer and I will accept it. –  Michal M Mar 17 '11 at 13:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.