I have clean installed Mac OSX Yosemite but I cant configure the Apache 2.4 like I have always done on older OSX versions.
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...
How to simply reroot my localhost ?
EDIT (thanks to Krister Andersson for the answer)
For Mac OSX 10.10 Yosemite
I also post the changes I had to do to keep things running.
In "/etc/apache2/users/", I created a file named by my username like this "myUsername.conf".
You can get your username by typing "id" in terminal. You should find your username at start in "uid=501(myUsername)".
In this new "myUsername.conf" file, just copy past this:
<Directory "/Users/myUsername/Sites/"> AllowOverride All Options Indexes MultiViews Options +FollowSymLinks Require all granted </Directory>
Dont forgive to change the
Then, in the "/etc/apache2/httpd.conf" file, uncomment all these two lines:
167 #LoadModule userdir_module libexec/apache2/mod_userdir.so 169 #LoadModule php5_module libexec/apache2/libphp5.so
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"
In Terminal, restart apache by typing "sudo apachectl restart".
It work's for me on Mac OS X 10.10 Yosemite clean install.