Why is Mac OS X Lion Apache DocumentRoot /usr/htdocs?
--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Over a Mysterious Island Looping
--
Chapters
00:00 Why Is Mac Os X Lion Apache Documentroot /Usr/Htdocs?
00:28 Answer 1 Score 0
00:40 Accepted Answer Score 14
01:12 Answer 3 Score 0
01:32 Thank you
--
Full question
https://superuser.com/questions/358944/w...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#macos #osxlion #apachehttpserver
#avk47
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Over a Mysterious Island Looping
--
Chapters
00:00 Why Is Mac Os X Lion Apache Documentroot /Usr/Htdocs?
00:28 Answer 1 Score 0
00:40 Accepted Answer Score 14
01:12 Answer 3 Score 0
01:32 Thank you
--
Full question
https://superuser.com/questions/358944/w...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#macos #osxlion #apachehttpserver
#avk47
ACCEPTED ANSWER
Score 14
When "Web Sharing" is NOT enabled it takes /usr/htdocs
as the root. When you enable "Web Sharing" it will take the config file at /etc/apache2/httpd.conf
. The directory will be the one specified near the following section on the file.
<IfDefine WEBSHARING_ON>
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Library/WebServer/Documents"
Also you con use your "Sites" directory at /Users/USERNAME/Sites
accessing with localhost/~USERNAME
.
ANSWER 2
Score 0
Enable your Web Sharing first, Go to the system preferences -> Sharing then enable web sharing. I wrote a post on it.
ANSWER 3
Score 0
This Q helped me solve identical problem on SnowLeopard today. Beware: it was the httpd.conf
in /private/etc/apache2
not in /etc/apache2
(which also exists) that got read and pointed to /Library/WebServer/Documents
in my case.
I hope this helps (others too).