As I posted previously I’m now running MAMP as I wait for a nice PHP 5 package to be available. I did some research about how MAMP handles the htdocs folder, which is the one where you should have you web pages stored, and here are my findings. MAMP is designed to be self-contained, meaning it will not work if the htdocs folder is outside the MAMP folder in your applications, however, I just, accidentally, found a way of doing this and actually keep MAMP working.
If you open the httpd.conf file in /Applications/MAMP/conf/apache and scroll all the way down, you will find the virtual hosts section, in this section add a new virtual host, like this:
NameVirtualHost *
<VirtualHost *>
ServerName localhost
DocumentRoot “/Users/Stefan/Sites”
</VirtualHost>
In the previous example /Users/Stefan/Sites is where I have my pages stored and each time I call http://localhost in my browser MAMP will actually load the pages from there, so I have no need of moving everything into the MAMP’s htdocs folder.
You can add as much virtual hosts as you like and place them wherever you like, and MAMP will load and parse them just fine. You’re actually tricking it into believing the files are stored where they “should”.