If everything worked, you should be able to see and access the site just like you can on your machine that actually runs the Local program! Attempt to navigate to one of your Local sites (ex: ). Open up a browser window on the same computer you just used to edit your hosts file. OS X example: Control + x to close file, then press y and return when prompted to save.Add a new line for each Local site you’d like to view with the site’s domain name and the IP address you noted in Step 3.The hosts file will open in nano, a command-line text editor. Type the password for your current user when prompted (nothing will display on the screen), and press return again. OS X example: With the Terminal open, type “sudo nano /etc/hosts” and press return.Since this is a system file, you may need to use the Terminal to open the file so that you can sudo, giving yourself temporary superuser permissions. On OS X, this is located at “/etc/hosts”. From the other computer you want to use to access Local sites, open up your hosts file.Step 4: change hosts file on your other machines This will start the Local VM without the window we saw earlier, which is the normal way Local operates. Back in VirtualBox with the “local-by-flywheel” VM selected, click the arrow next to the start button and select “Headless start”, or right-click on the VM and select “Headless start” from the menu under Start.Once the VM shuts down, the window will disappear. Close the new VM window and select “save the machine state” when you’re prompted for an option.This is the IP we will use to access our Local sites from our other machine. Under Adapter 3 (Bridged adapter), make note of the IP address. A tooltip will pop up with information for all of your VM’s network adapters. This is the same icon you saw in the VM settings panel for Network. Once the VM is loaded, hover over the icon of two monitors at the bottom of the VM window.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |