Reputation: 559
Disclaimer: I'm new to most of this
I just downloaded virtualbox yesterday and installed ubuntu 10.04 on it today. My plan is to mirror the production/staging environments that I plan to deploy to.
Anyway I just set up nginx and I want to make sure that the installation worked properly and I need to access the equivalent of what would be localhost on my ubuntu virtualbox installation.
I'm running the latest version of Lion with the latest version of virtualbox.
Upvotes: 4
Views: 3309
Reputation: 24370
You can access your guest VM in one of two ways, your choice depends largely upon your existing network infrastructure and needs.
The easiest way is typically to configure the virtual network adapter in Bridged Mode. You can do this by changing the virtual machine settings on the Network section/tab. This will make your guest OS appear on your the same LAN segment as the host so you would connect to it the same way you would any other host on your subnet. There are some drawbacks, such as not working well with wireless networks, that you should account for in your decision.
The alternative is to configure the network adapter as NAT (this is typically the default) and configure some port forwarding options like you would on your router to allow access to a host. Again, on the network configuration section of the machine settings, under the advanced area there is a button for Port Forwards that will allow you to setup rules to forward certain traffic from your host computer to the guest operating system.
Upvotes: 5