Localhost/foldername not working after upgrading to Yosemite

apache-http-serverlocalhostosx-yosemite

After upgrading to Yosemite I can no longer access folders in my Sites directory like this:

http://localhost/foldername

instead I have to add ~myusername after localhost like this:

http://localhost/~username/foldername

or I'm getting the following error:

Not Found

The requested URL /foldername was not found on this server.

Any ideas?

Best Answer

In case anyone has the same problem, this is the solution:

in your httpd.conf file ... search for "DocumentRoot" ... then change that entry and the entry to read "/Users/< your username goes here >/Sites" then sudo apachectl restart ... this should then load the pages w/o needing the ~/username part (at least it worked for me)

more info: http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-10-yosemite/ (see comments below)

Related Question