up vote 2 down vote favorite
share [g+] share [fb]

I'm using the built-in server on my Mac.

The url to my Sites folder is: http://localhost/~username/

with MAMP I had just http://localhost/

Is there any way to get just http://localhost/ with the built-in server?

I have only one user account on my Mac.

link|improve this question
feedback

3 Answers

up vote 2 down vote accepted

You want to change the "DocumentRoot" setting in the file /etc/apache2/httpd.conf, and restart web sharing.

link|improve this answer
feedback

You need to put your site in /Library/WebServer (not sure about WebServer part but it should be similar) and make sure permissions are correct.

link|improve this answer
I want to have the files in the Sites folder, can I create an hardlink/symlink or something? – Sindre Sorhus Sep 5 '09 at 17:13
Yes, you can. But do it in the Terminal, the Finder doesn't really create real hard/symlinks. – christian Sep 16 '09 at 11:43
feedback

The best way to do this, which I've already done is this terminal command (first delete, rename or move the Documents folder out of /Library/WebServer): ln -s ~/Sites/ /Library/WebServer/Documents.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.