I just spent an hour trying to get this to work following the steps on SO but mine ended up being a bit different.
VMWare settings
1.) Set VMWare connection to NAT
2.) run > cmd > ipconfig > copy Default Gateway value
3.) edit hosts file (c:/Windows/System32/drivers/etc/hosts)
- add this to your hosts file:
<gateway-ip> yourserver.local
OS X settings
1.) edit Apache config (e.g., sudo vim /etc/apache2/httpd.conf)
- add this vhost entry to your httpd.conf file:
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "/path/to/your/project"
ServerName yourserver.local
<Directory "/path/to/your/project">
AllowOverride All
Options All
</Directory>
</VirtualHost>
2.) Edit your hosts file (sudo vim /etc/hosts)
- add this line to your hosts file
127.0.0.1 yourserver.local
3.) Restart Apache (sudo apachectl restart)
I found that I had to switch the connection setting on VMWare in order to restart the connection before these settings worked for me. I hope this helps.