From owner-freebsd-isp Wed Oct 2 23:55:37 2002 Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75C6137B401 for ; Wed, 2 Oct 2002 23:55:35 -0700 (PDT) Received: from users.munk.nu (213-152-51-194.dsl.eclipse.net.uk [213.152.51.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64D0143E42 for ; Wed, 2 Oct 2002 23:55:34 -0700 (PDT) (envelope-from munk@users.munk.nu) Received: from users.munk.nu (localhost [127.0.0.1]) by users.munk.nu (8.12.5/8.12.3) with ESMTP id g937u4vD058021 for ; Thu, 3 Oct 2002 07:56:04 GMT (envelope-from munk@users.munk.nu) Received: (from munk@localhost) by users.munk.nu (8.12.5/8.12.3/Submit) id g937u30X058020 for freebsd-isp@FreeBSD.ORG; Thu, 3 Oct 2002 07:56:03 GMT Date: Thu, 3 Oct 2002 07:56:03 +0000 From: Jez Hancock To: FreeBSD ISP List Subject: Re: Apache vhost directive problem Message-ID: <20021003075602.GA57985@users.munk.nu> Mail-Followup-To: FreeBSD ISP List References: <20021003043348.GA55962@users.munk.nu> <20021003093609.I96307-100000@cox.rosnet.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021003093609.I96307-100000@cox.rosnet.ru> User-Agent: Mutt/1.4i Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Oct 03, 2002 at 09:38:13AM +0400, Konstantin M Volevatch wrote: > On Thu, 3 Oct 2002, Jez Hancock wrote: > > > Date: Thu, 3 Oct 2002 04:33:48 +0000 > > From: Jez Hancock > > To: FreeBSD ISP List > > Subject: Apache vhost directive problem > > > > Hi folks, > > > > I have a problem with my apache httpd vhost configuration. > > > > My vhost entries for numerous users look like this: > > > > > > ServerName eggshell.munk.nu > > ServerAdmin support@munk.nu > > DocumentRoot /home/eggshell/web > > ErrorLog /home/eggshell/logs/httpd-error.log > > CustomLog /home/eggshell/logs/httpd-access.log combined > > > > > > and the problem I'm having is that if a user removes either their logs > > or web dir, the server will not (re)start correctly since the vhost > > configuration is broken after such changes. > > Use 'apachectl configtest' before restart > Also, you may set 'sunlnk' flag on 'web' subdir Nice one, I'll have a read of man chflags, could be the command I need to run on a few items when creating user's home dirs (I'm also trying to stop user's from being able to modify their .history files if anyone can point me in right direction). What I have so far is this (perl script): sub createUser{ # $user is passed in to this func: my $user=shift; my $pw_cmd="$pw adduser -n $user -m"; #exec cmd (password is returned, but this depends on #pw.conf(5) 'defaultpasswd' setting: my $pass=&doCmd($pw_cmd); # doCmd just execs the command passed to it # is this safe to get at password this way? chomp($pass); # chown the logs dir as well to stop users from # deleting it: my $cmd="chown www /home/$user/logs && chmod 755 /home/$user/logs"; &doCmd($cmd); return($pass); } Any hints/tips would be much appreciated (or any full blown scripts I could take a look at:). Cheers again, Jez To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message