Apache is the open-source web server project that is used by most of the Internet. It is installed on OS X and provides web page sharing.

Before configuration, make a backup of the following file and then edit it

    /etc/httpd/edit httpd.conf

(This will bring up the command-line editor of TextWrangler - if installed. Aternatively use "pico" instead of "edit".)


-to change the default path of the root web page served, change the following two lines (which are at different line locations):

    DocumentRoot "/Library/WebServer/Documents"
    <Directory "/Library/WebServer/Documents">

to your desired page path:

    DocumentRoot "/users/lgrove/sites"
    <Directory "/users/lgrove/sites">

To prevent outside web browsers from being able to see .DS files created by the HFS+ file system:

in the UserDir section, below the following section:

    <Files ~ "^\.ht">
        Order allow,deny
        Deny from all
        Satisfy All
    </Files>

add this section:

    <Files ~ "^\.[Dd][Ss]_[Ss]">  
        Order allow,deny
        Deny from all
        Satisfy All
    </Files>