You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Tony Sanders <sa...@bsdi.com> on 1996/01/11 18:51:46 UTC

Re: mod_env.c...

Andrew Wilson writes:
> ... has been copied to www.apache.org/dist/contrib/modules.  The
> module's been used for a while now by people converting from CERN to
> Apache and the nth bug report of the week asking for this convinced me
> to make it public.  From the module's header:

Which brings up a (minor) point I would like to offer to the group.
I decided about a year ago that I should really be running my web
server from a known environment -- when starting at system boot
time the environment is very clean but if you kill it and restart it
from your login shell later then the environment is fairly polluted.

So I wrote the little wrapper startup script below that lets me
control the enviroment.  Feel free to use something like this if
it would be useful.

#!/bin/sh
# setup a known secure environment for the server
/usr/bin/env - \
	LOGNAME="www" \
	USER="$LOGNAME" \
	PATH="/usr/bin:/bin:/usr/X11/bin:/usr/sbin:/sbin:/usr/contrib/bin:/usr/contrib/mh/bin" \
	HOME="/bsdi/www" \
	BLOCKSIZE=1024 \
	NAME="BSDI Web Account" \
	ORGANIZATION="Berkeley Software Design, Inc." \
	SHELL="/bin/sh" \
	/usr/contrib/bin/daemon /bsdi/www/server/plexus -h bsdi.BSDI.COM \
		-s /bsdi/www/server -c bsdi.conf -d /bsdi/www \
		</dev/null >/dev/null 2>&1