Women in Technology

Hear us Roar



Article:
  Location, Location, Location: Tips for Storing Web Site Files
Subject:   Correction
Date:   2003-05-17 11:07:58
From:   icalshare
Response to: Option 1 (~/Sites folder) BADLY wrong???

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, 'http://127.0.0.1' would become 'http://127.0.0.1/~ your_user_name/', and so on.


Cheers,
Patrick

Main Topics Newest First

Showing messages 1 through 1 of 1.

  • Correction <-- comments on
    2003-05-17 14:10:20  anonymous2 [View]

    Two nit-picky notes:

    Be careful with the phrase "single-user mode"--I know you mean that only one person ever uses the machine; it auto-logs-them-in; they never think of "logging out", only shutting down; and so on. But in technical terms, "single-user mode" on OS X means holding down apple-s at startup, which boots you straight to a root shell (no password) instead of the gui. It's intended to save a broken machine by giving you full command-line access. Also, you may confuse people because there is no "setting" for single-user mode vs multi-user mode--it's just the existence of other gui accounts or not. So maybe say something about being the "sole user of the machine", or it being a "shared machine with multiple accounts".

    DocumentRoot is already "enabled" (set to /Library/WebServer/Documents). You'd want to *change* its value, which is a perfectly good idea. But then you have some confusion about what .conf file controls what--you can edit /etc/httpd/users/username.conf and ignore the main directives in httpd.conf, or you could change the main <Directory> block in httpd.conf and comment out your username.conf file (so it won't override your earlier settings).

    Sorry to be pushy, but I spend a good bit of time in forums answering similar questions and there is no point in confusing people unnecessarily with published material...