Keeping the Mac OS X Apache's httpd.conf file unmodified

Date view Thread view Subject view Author view Attachment view

From: Aron Roberts (aron@socrates.berkeley.edu)
Date: Wed Jun 18 2003 - 14:34:56 PDT


   As a tangent flowing out of the discussion begun by Sara Leavitt,
in addition to keeping non-CGI files out of the Apache Web server's
CGI-Executables directory under Mac OS X, a second suggestion would
be to avoid modifying Apache's main httpd.conf configuration file
altogether.

   Instead, you can place customizations to Apache's configuration in
your own file(s) in the /private/etc/httpd/users directory. These
files will be loaded by the Include directive in the last line of the
main httpd.conf file.

   By following this approach, if Apple and/or the Apache folks make
changes to the main httpd.conf file in future operating system or
Apache releases, your own configuration changes won't be touched. It
also might make it easier to manage sets of configurations, such as
configurations which vary on a per-user basis for users' own Sites
directories.

   Two articles suggesting this approach are:

   Rael Dornfest, "Getting the heck out of httpd.conf"
   http://www.oreillynet.com/pub/h/120
   and
   macosxhints, "Restoring the Apache config file after 10.2.4 update"
   http://www.macosxhints.com/article.php?story=20030214134914285

   For more on using per-user Apache configuration files with user Web
sites, see the "User-Based Configurations" section of:

   Kevin Hemenway, "Apache Web-Serving with Mac OS X, Part 4"
   http://www.macdevcenter.com/pub/a/mac/2002/01/29/apache_macosx_four.html

   And a question spurred by that article:

   "Changing .conf has no effect"
   http://www.oreillynet.com/cs/user/view/cs_msg/7035

   Hemenway's article goes on to cover yet another approach to
configuring Apache: via .htaccess files. These can optionally - at
the cost of some security and manageability, depending on how they're
used - further modify Apache's configuration, again without touching
the main httpd.conf file.

Aron Roberts
Workstation Software Support Group

------------------------------------------------------------------------
The following was automatically added to this message by the list server:

For information about MAGNet, its meetings and events, and its
mailing list, including information on subscribing and unsubscribing,
see the MAGNet Web site at <http://magnet.berkeley.edu/>.


Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.5 : Wed Jun 18 2003 - 14:37:29 PDT