ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
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


1 to 1 of 1
1 to 1 of 1