Date: Thu, 25 Jul 2002 03:45:51 -0500 From: Henrik Hudson <lists@rhavenn.net> To: "Erik Mattsson" <erik.mattsson@imbridge.com>, <freebsd-questions@FreeBSD.ORG> Subject: Re: Newbie question about apache Message-ID: <200207250345.51348.lists@rhavenn.net> In-Reply-To: <008701c233b5$1fd69950$0800a8c0@imbridge.se> References: <008701c233b5$1fd69950$0800a8c0@imbridge.se>
next in thread | previous in thread | raw e-mail | index | archive | help
"Userland" startup scripts (ie: the ones created by the admin) go in: =09/usr/local/etc/rc.d Create a shell script, for this example: apache.sh and then chmod 755 it= =2E Note: The files HAVE to be called something.sh and they HAVE to be chmod = 755 =20 otherwise they don't work. Note: Use the apachectl script to start and stop apache. Just had a thoug= ht..=20 I haven't used Apache 2 yet..so don't know if this will work..but I do th= e=20 below for Apache 1.3 ... so it should be something similar In the file do something like this: START SCRIPT EXAMPLE #!/bin/sh #Script for starting and stapping apache #Grab our command mode=3D$1 # start or stop case "$mode" in =20 'start') # Start daemon /path/to/apachectlscript/apachectl start =20 ;; =20 =20 'stop') =09#Stop daemon =09/path/to/apachectlscript/apachectl stop ;; =20 *) # usage echo "usage: $0 start|stop" exit 1 ;; esac END SCRIPT EXAMPLE Hope that helps :) Henrik On Thursday 25 July 2002 03:27, Erik Mattsson wrote: > Hi > > I've just installed the apache2 from /usr/ports/www, and I want this to= run > everytime when I reboot the machine. How do I do it? > > Ive also installed tomcat4.0 and want it to run at boot time as well, B= UT > how do i force it to run as the www user? > > //erik > --------------------------------------------------------------------- > Erik Mattsson > > imBridge AB > Vasaplatsen 8 > SE-411 34 G=F6teborg > > Phone: +46-31-138310 > Mobile: +46-733-174116 > www.imbridge.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message --=20 Henrik Hudson lists@rhavenn.net Note: Beware of Dragons - Thou art crunchy and taste good with ketchup. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207250345.51348.lists>