Installing XAMPP on Mac OS X Lion. Or, the extra fiddly step.

Recently I was lucky enough to get a new Mac. I have to say that the App Store makes it very easy to install all your applications from one place; providing you got them from there to begin with. If you've ever messed about with Linux, well, you'll know where the idea of the App Store probably really comes from.

Anyway. XAMPP. These days it's one of the first things I install. The initial part of the install is very easy > download > extract and open the disk image > drag and drop > done.

However, installing it on a clean Mac with OS X Lion had an extra fiddly step that I've not come across before ... OS X Lion has no Sites folder.

Nosites

The Sites folder has always been there. Once I'd installed XAMPP, I stared at Home directory, thinking, "What the heck do I do?"

My first thought was just to make one. But. Then I thought, "How do I then link that to the htdocs folder in XAMPP?" Usually this all happens automatically. I felt sure there must still be some sort of automatic way of doing it still there.

Here's what I figured out:

Install XAMPP as usual. However. When you launch it and type http://localhost/~yourusername/ in your browser, well, your browser bitches that it can't find nothin'.

What you need to do is close XAMPP and open Preferences. Click on Sharing. Then. Make sure Web Sharing is enable. Once Web Sharing is enable you'll see various options in the right hand side of the pane:

Websharing

Click: Create Personal Website Folder.

SHAZAM! The Sites folder is back in your Home directory. The only thing left to do is switch off Web Sharing (XAMPP won't run when it's enabled) and you're set.