This one of the many great good things which I like in mac. Mac already comes with apache configured so you can just start building your own site. I use this to check the pages before uploading to server and also for sharing things blogging privately among wing mates locally.
By default php is not enabled when you configure apache to any computer so here is the way to make it work on mac.

Open file /private/etc/apache2/httpd.conf for edit for this you may use
sudo vi /private/etc/apache2/httpd.conf

Uncomment the line which read something like 
LoadModule php5_module libexec/apache2/libphp5.so
you can search this line on vi

Now restart your Web Sharing
Open System Preferences and go to Sharing
Stop and then restart Web Sharing
That’s it!