I'm running a virtual mashine on my windows 7. In it a ubuntu linux with apache server.
How can I get to a site hosted on my ubuntu from windows?
Example: Want to get to http://localhost/~user/ from windows
Terribly badly-written question but if I understand you correctly all you need to do is point your browser at the VM's IP address, if you use some form of DNS registration then you'll be able to browser to it using that. Basically that it's in a VM is irrelevant, just treat it like it was a regular physical machine.
Also can you update your question with the name of the VMWare product you're using as they're a company that have lots of different products.