Location, Location, Location: Tips for Storing Web Site Files
Subject:   Option 1 (~/Sites folder) BADLY wrong???
Date:   2003-05-17 09:56:52
From:   anonymous2
The article says:
for ~/Sites/ -->

But that will serve the files in /Library/WebServer/Documents (the webserver's DocumentRoot), not those in ~/Sites/. For access to a user's Sites folder, you need:
with subdirectories and filenames appended to that base. Otherwise, on a multiuser machine how would apache know whose Sites to show?

If I am right (99% sure) please correct the article!!!

Main Topics Newest First

Showing messages 1 through 1 of 1.

  • Correction
    2003-05-17 11:07:58  icalshare [View]

    I will add a clarification on this issue ASAP. In the meantime, here are two options:

    (1) If you're running OS X in single-user mode (which I suspect is the case for most of you) and want to keep things simple, just enable the DocumentRoot option in your Apache config file (/etc/httpd/httpd.conf/).

    DocumentRoot "/Users/your_user_name/Sites/"

    Doing this will allow you to serve files from your Sites folder without appending your user name to the localhost address (as specified in my first example).

    (2) If you need to run in multi-user mode, just append the relevant user name to the localhost examples in the first section.

    So, '' would become ' your_user_name/', and so on.