title: Change localhost directory for Yosemite Apache 2.4
body: <p>I have clean installed Mac OSX Yosemite but I cant configure the Apache 2.4 like I have always done on older OSX versions.</p>
  
  <p>Here is what I want to do : set the "localhost" directory to "/Users/username/Public/".
  But, everything I tried won't work, I always get a "Forbiden, can't access to /" or I get the default "It works!" page...</p>
  
  <p>How to simply reroot my localhost ?</p>
  
  <p>Thx</p>
  
  <p><strong>EDIT (thanks to Krister Andersson for the answer)</strong></p>
  
  <p><strong><em>For Mac OSX 10.10 Yosemite</em></strong></p>
  
  <p>I also post the changes I had to do to keep things running.</p>
  
  <p>In "/etc/apache2/users/", I created a file named by my username like this "myUsername.conf".</p>
  
  <p>You can get your username by typing "id" in terminal. You should find your username at start in "uid=501(myUsername)".</p>
  
  <p>In this new "myUsername.conf" file, just copy past this:</p>
  
  <pre><code>&lt;Directory "/Users/myUsername/Sites/"&gt;
      AllowOverride All
      Options Indexes MultiViews
      Options +FollowSymLinks
      Require all granted
  &lt;/Directory&gt;
  </code></pre>
  
  <p>Dont forgive to change the <code>myUsername</code> value.</p>
  
  <p>Then, in the "/etc/apache2/httpd.conf" file, uncomment all these two lines:</p>
  
  <pre><code>167 #LoadModule userdir_module libexec/apache2/mod_userdir.so
  169 #LoadModule php5_module libexec/apache2/libphp5.so
  </code></pre>
  
  <p>Line 236, change the directory of "DocumentRoot" to whatever you want.
  Line 250, set "Options" to "Options "Options Indexes FollowSymLinks Multiviews".
  Line 258, set "AllowOverride None" to "AllowOverride All".
  Line 263, set "Require all denied" to "Require all granted"</p>
  
  <p>In Terminal, restart apache by typing "sudo apachectl restart".</p>
  
  <p>It work's for me on Mac OS X 10.10 Yosemite clean install.</p>