Exposing web server in VM to your laptop
From EECS 182
Exposing web server in VM to your laptop
(→Overview) |
(→Overview) |
||
Line 5: | Line 5: | ||
By default, that is not possible, but with a simple change to Virtualbox's network configuration, it is possible to enable that. The main thing to realize here is that Mint is a virtual machine with its own network address (identity). To permit the change, do the following: | By default, that is not possible, but with a simple change to Virtualbox's network configuration, it is possible to enable that. The main thing to realize here is that Mint is a virtual machine with its own network address (identity). To permit the change, do the following: | ||
− | # Go to Settings -> Network for the virtual machine in the Virtualbox Menu. Make sure both NAT and Host-only networking is enabled. It does not matter which adapter is 1 or which one is 2. | + | # Go to Settings -> Network for the virtual machine in the Virtualbox Menu. Make sure both NAT and Host-only networking is enabled. It does not matter which adapter is 1 or which one is 2. Hit OK. |
Line 13: | Line 13: | ||
</gallery> | </gallery> | ||
− | + | ||
+ | # Very important: '''Restart your Mint VM.'''. Without restarting Mint, the new network settings will not take effect. | ||
+ | |||
+ | # Login into Mint and start a Terminal. Type in the "ifconfig" command. Look for a network address that starts with "192.168". |
Revision as of 04:35, November 18, 2011
Overview
Your virtual machine (Mint) for 182 is configured with Apache web server, which can be accessed by a web server within Mint at http://localhost or http://127.0.0.1. But, what if you want to use your laptop's browser to access the Mint's web server?
By default, that is not possible, but with a simple change to Virtualbox's network configuration, it is possible to enable that. The main thing to realize here is that Mint is a virtual machine with its own network address (identity). To permit the change, do the following:
- Go to Settings -> Network for the virtual machine in the Virtualbox Menu. Make sure both NAT and Host-only networking is enabled. It does not matter which adapter is 1 or which one is 2. Hit OK.
- Very important: Restart your Mint VM.. Without restarting Mint, the new network settings will not take effect.
- Login into Mint and start a Terminal. Type in the "ifconfig" command. Look for a network address that starts with "192.168".