For all those web developers who rushed out to upgrade to OS X Leopard - if you're like me and you used the Sites folder in your home directory for testing your websites, you may have noticed that you can no longer access http://localhost/~username/ after your upgrade to Leopard. It took me a minute or two to figure out, but here's the problem and a solution (if you are command-line friendly):
Leopard features the Apache v2 webserver, as opposed to the older Apache v1 in Tiger. In the old Tiger OS, the Apache configuration files were stored in /private/etc/httpd/. That's changed in Leopard. The new path is /private/etc/apache2/.
When a user is created on your system, a small Apache configuration file is created that enables Apache to serve content from their ~/Sites/ directory. Under Tiger, these files were stored in /private/etc/httpd/users/. From what I can tell, if you've done an upgrade from Tiger to Leopard, those files do not get migrated over to the new /private/etc/apache2/users/ folder.
So, in order to make your sites work again, make sure to copy your Apache per-user configuration files from /private/etc/httpd/users to /private/etc/apache2/users. For example, I had to do this:
$ sudo cp /private/etc/httpd/users/michealk.conf /private/etc/apache2/users/
$ sudo apachectl restart
User websites broken after upgrading to OS X Leopard? Try this...
Submitted by Mike on Sun, 11/04/2007 - 17:52.

Fantastic!
This was confounding me, and editing the httpd.conf file in the old location wasn't doing much. Your solution worked perfectly for me. Still seems like my virtual host and PHP5 configuration is also broken, but I suspect I'll figure that out soon enough now that I know where the config files are. thanks again! -tony
PHP is disabled by default
Glad that I could help Tony. As for PHP, you'll want to look in /etc/apache2/httpd.conf for the line:
#LoadModule php5_module libexec/apache2/libphp5.so
PHP is shipped disabled - just remove the leading # and then:
sudo apachectl restart
and you'll be on your way.