06 Jul
Posted by krisgale as virtualization, windows, os x, apache
first, edit your web server’s httpd.conf (for example, /Applications/MAMP/conf/apache/httpd.conf) and add a VirtualHost with some name other than “localhost” (we do this because windows may reserve localhost for some of its services).
NameVirtualHost yourhostname:80
<VirtualHost *:80>
ServerName yourhostname
DocumentRoot “/your/directory/here”
</VirtualHost>
edit leopard’s “hosts” file:
sudo nano -w /etc/hosts
and append your new host name to the existing line for localhost:
127.0.0.1 localhost yourhostname
now, launch windows in your virtualization software of choice (virtualbox is great, and free), create a new batch file (local.bat) on your desktop, and paste this in:
@echo off
ipconfig
notepad c:\windows\system32\drivers\etc\hosts
essentially, this will shortcut the process of determining the host’s virtual network addresses and a way to modify the windows “hosts” file, should we need to change it in the future.
take note of the gateway address in the command window, and add it to the “hosts” file already open in notepad.
10.0.2.2 yourhostname
make sure you have your web server running in your host OS, then try to visit http://yourhostname/ in a web browser in your guest OS… welcome to the wildly efficient world of cross-browser, cross-platform testing on the same machine!
| bookmark it! | ||||||
|
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Apr | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||
One Response
Mark
July 7th, 2009 at 5:50 pm
1MAMP … nano … lulz!!1
RSS feed for comments on this post · TrackBack URI
Leave a reply