How do I get my user directory working for web sharing again? I had web sharing enabled in Lion and a web site at http://localhost/~user, where user is my User directory.  When I upgraded to Mountain Lion, web sharing (Apache) remained enabled and I can go to localhost and get the "It works!" default web page, but I cannot access my user page anymore.  The error is 


  Forbidden
  
  You don't have permission to access /~user/ on this server.


How do I re-enable my user directory's web page?
Here is how you can re-enable the web page with the command line using Terminal.

First copy this and paste it into Terminal.  You may have to press enter after pasting to run it.  It will ask for your password because it is adding a file to your system directory.

USER_DIR=$(basename $(echo ~))
sudo bash -c "cat &gt; /etc/apache2/users/$USER_DIR.conf" &lt;&lt;TEXT
&lt;Directory "/Users/$USER_DIR/Sites"&gt;
     Options Indexes MultiViews
     AllowOverride None
     Order allow,deny
     Allow from all
&lt;/Directory&gt;
TEXT


Then run this command to restart the web server:

sudo apachectl restart