{"id":95,"date":"2012-07-16T15:30:14","date_gmt":"2012-07-16T15:30:14","guid":{"rendered":"http:\/\/jsndev.net\/?p=95"},"modified":"2012-07-16T15:30:14","modified_gmt":"2012-07-16T15:30:14","slug":"configure-windows-7-with-mamp-virtual-hosts-and-virtual-box","status":"publish","type":"post","link":"https:\/\/2022.jasonrikard.com\/?p=95","title":{"rendered":"Configure Windows 7 with MAMP virtual hosts and Virtual Box"},"content":{"rendered":"<p>I&#8217;m using MAMP Pro for local web development on OSX Lion and needed to test some javascript compatibility with IE so I booted up a virtual machine. It took me a few minutes to figure how to have the DNS resolve to my local development domains that were set up on my main OS. \u00a0I couldn&#8217;t find this tip immediately online so here it is.<\/p>\n<p>If you want to be able to access your named virtual hosts that you set up on MAMP on a Windows 7 virtual machine make sure you update your hosts file on the Windows VM.<\/p>\n<p>Here&#8217;s what works for me.<\/p>\n<ol>\n<li>Install <a href=\"http:\/\/www.mamp.info\/en\/mamp-pro\/\" target=\"_blank\" rel=\"noopener\">MAMP Pro<\/a><\/li>\n<li>Setup local development host in MAMP<\/li>\n<li>Install <a href=\"https:\/\/www.virtualbox.org\/\" target=\"_blank\" rel=\"noopener\">Virtual Box<\/a><\/li>\n<li>Setup Windows 7\n<ul>\n<li>Highly recommended process\u00a0<a title=\"https:\/\/github.com\/xdissent\/ievms\/\" href=\"https:\/\/github.com\/xdissent\/ievms\/\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/xdissent\/ievms\/<\/a><\/li>\n<li>Default Virtual Box network settings attached to NAT worked for me<\/li>\n<\/ul>\n<\/li>\n<li>Edit the Windows 7 hosts file\n<ol>\n<li>Run Notepad as admin in Windows.<\/li>\n<li>Open C:\\Windows\\System32\\drivers\\etc\\hosts<\/li>\n<li>Add 10.0.2.2 yourdevdomain\n<ul>\n<li>Add more if you have want.<\/li>\n<\/ul>\n<\/li>\n<li>Save the file.<\/li>\n<li>Instance restart may be required.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<div><span style=\"line-height: 18px;\">If that doesn&#8217;t work, check what port Apache is running on and edit the hosts file accordingly.<\/span><\/div>\n<p><a href=\"http:\/\/jsndev.net\/wp-content\/uploads\/2012\/07\/windows_hosts_file.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-96\" title=\"windows_hosts_file\" src=\"http:\/\/jsndev.net\/wp-content\/uploads\/2012\/07\/Screen-Shot-2012-07-16-at-11.20.47-AM.png\" alt=\"\" width=\"662\" height=\"405\" srcset=\"https:\/\/2022.jasonrikard.com\/wp-content\/uploads\/2012\/07\/Screen-Shot-2012-07-16-at-11.20.47-AM.png 662w, https:\/\/2022.jasonrikard.com\/wp-content\/uploads\/2012\/07\/Screen-Shot-2012-07-16-at-11.20.47-AM-300x184.png 300w\" sizes=\"auto, (max-width: 662px) 100vw, 662px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m using MAMP Pro for local web development on OSX Lion and needed to test some javascript compatibility with IE so I booted up a virtual machine. It took me a few minutes to figure how to have the DNS resolve to my local development domains that were set up on my main OS. \u00a0I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[11,19],"class_list":["post-95","post","type-post","status-publish","format-standard","hentry","category-development","tag-development-2","tag-mamp"],"_links":{"self":[{"href":"https:\/\/2022.jasonrikard.com\/index.php?rest_route=\/wp\/v2\/posts\/95","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2022.jasonrikard.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2022.jasonrikard.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2022.jasonrikard.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/2022.jasonrikard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95"}],"version-history":[{"count":0,"href":"https:\/\/2022.jasonrikard.com\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions"}],"wp:attachment":[{"href":"https:\/\/2022.jasonrikard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2022.jasonrikard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2022.jasonrikard.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}