VirtualHosts and Mac OSX Lion

4 Dec

Good luck using the server controls on Mac OSX Lion (10.7.2) for setting up virtual hosts.  I wasted an hour trying to get the built-in tools to work before bailing on them.  You really want to use PatrickG’s virtual host script (pretty much easy mode).  See:

and just run the script.  The script makes it sound like you *have* to put everything under ~/Scripts, but that’s an easy fix with a symlink.  Assuming you made a new site called kermit.dev, you’d do this:
sudo virtualhost.sh kermit.dev
cd ~/Sites
mv kermit.dev kermit.dev.old (yes, you could just go ahead and remove it)
I usually put my code under ~/code/projectname so just do this (assuming you did :
ln -s ~/code/projectname ./kermit.dev

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: