Yosemite is using new version of apache 2.4 (finally!), therefore all your previous settings have been whipped off and we need to re initialise apache.
Let's start with re-instantiating your home folder:
cd / && ls -laYou will noticed that your home folder no longer exists, instead everything has been moved to home-preserved.
Let's start with checking if your home folder can be created:
sudo vi /etc/auto_master
And make sure that following line /home is commented out and looks like that:
#/home auto_home -nobrowse, hidefromfinderIf not you will have to comment that out and reboot your computer.
Now it's time to rename home-preserved back to home
cd / && sudo mv home-preserved/ home/This should keep existing permissions on file structure (yourusername:staff), but if your not sure you can run:
cd /home && sudo chown -R {MAC_USER_NAME}:staff /home/.Let's start by making sure that you are root as there will be a lot of sudo commands going:
sudo -iNow time for setting apache. Open apache config file for editing:
nano /private/etc/apache2/httpd.confWe need to enable two major modules: mod_userdir and php5_module. Scroll down untill you will find
#LoadModule userdir_module libexec/apache2/mod_userdir.so and uncomment it:
LoadModule userdir_module libexec/apache2/mod_userdir.soAbout 2 lines down you'll find #LoadModule rewrite_module libexec/apache2/mod_rewrite.so, you need to uncomment that line.
LoadModule rewrite_module libexec/apache2/mod_rewrite.soAnd right below you should find #LoadModule php5_module libexec/apache2/libphp5.so and you need to uncomment that line too.
LoadModule php5_module libexec/apache2/libphp5.soScroll down (almost all the way) and you will find following line Include /private/etc/apache2/other/*.conf. Right beneeth that line paste following code:
Include /private/etc/apache2/users/*.conf
Include /private/etc/apache2/extra/httpd-userdir.conf
Include /home/vhosts/*.confYou need to set default timezone otherwise you will get Exception thrown every time you use date function:
sudo vi /etc/php.ini
And paste following setting:
date.timezone = Europe/London
Save and restart your apache
sudo apachectl restart