I've got OSX Server running on a macbook, and I'm looking to run an ubuntu server VM on it via VirtualBox. I'm thinking about hosting all my apache inside linux, and possibly some other services. I'm curious what a viable config would be, having not done this before. I need to do bridged network right? How do I direct web traffic to the VM instead of OSX? Haven't got my head wrapped around how this works yet so any help would be appreciated.
Think of your VM as a separate machine. Under bridged networking it will have its own IP on your local subnet, and will listen on port 80 (by default) when you install and set-up apache. If you then want to expose the web server to the internet, you would do this the normal way, presumably by allowing access through your Internet router. The main consideration is the fact that resources are shared between your Mac OS and the VM (i.e. total NIC bandwidth available is shared, RAM is shared, etc). But this may only be an issue for a high volume website.