When I bought my first Mac (an unibody MacBook btw.) I got into trouble installing XAMPP on it. I had problems with file permissions, configuration and not working virtual hosts. Spending hours of searching the web, I finally came up with a working XAMPP installation including virtual hosts. In order to help other mac and/or XAMPP greenhorns I wrote this quick how-to.

Step 1: Download XAMPP

Download the latest XAMPP for Mac OS X.

Step 2: Back up your old installation

Skip this step if you are installing XAMPP for the first time.

When you've already installed XAMPP on your Mac, you might have special data you should back up first. This could include:

When your're done backing up all important data, delete the old XAMPP directory in the "Programs" section.

Step 3: Install

Now just install the latest XAMPP on your Mac.

Step 4: Edit httpd.conf

Head over to "/xamppfiles/etc/httpd.conf" and make sure, you are authorized to read and write that file. Open it and look for this code:

User nobody
Group nogroup

Change it to:

User YOURUSERNAME
Group admin

Off course YOURUSERNAME is your valid user name.

Step 5: Set up virtual hosts

You can skip this step if you do not want to use virtual hosts.

Last step: Start Apache

Start Apache with the XAMPP control panel. Open your web browser and type test.dev or whatever you named your website in the httpd-vhosts.conf. You now should see your website using XAMPP (and virtual hosts) on your Mac.

Now start developing great web applications =)