Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Nov 1998 14:28:19 -0500 (EST)
From:      Patrick Gardella <patrick@cre8tivegroup.com>
To:        Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
Cc:        freebsd-questions@FreeBSD.ORG, Aaron Clow <aaronc@atari.cmj.com>
Subject:   RE: Apache autostart upon reboot
Message-ID:  <XFMail.981118142819.patrick@cre8tivegroup.com>
In-Reply-To: <XFMail.981118202313.asmodai@wxs.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

On 18-Nov-98 Jeroen Ruigrok/Asmodai wrote:
> On 18-Nov-98 Aaron Clow wrote:
>> After an uptime of 52 days on my new FreeBSD/Apache server, my office
>> power went out and the machine rebooted. It's not mission-critical (just a
>> 486/25 sitting headless under my desk, running a personal website), so I
>> don't have a UPS on it. I would, however, like Apache to be restarted if
>> the machine reboots itself. Is there an initscript in FreeBSD that takes
>> care of this? If so, anyone know where it is and what I need to change to
>> activate the auto-start of apachectl?
> 
> Add Apache to the inetd list and enable inetd?

Apache doesn't recommend this, IIRC.

> Or put it in /etc/rc.local if memory serves...

Put a script in /usr/local/etc/rc.d

#!/bin/sh

[ -x /usr/local/sbin/httpd ] && /usr/local/sbin/httpd && echo -n ' httpd'

I don't recall if Apache put that there or if I did.  

I've also used a script that calls "/usr/local/sbin/apachectl start" instead of
calling httpd directly.  

Patrick

---
Patrick S. Gardella                    Director of Web Development 
The Creative Group    1-800-804-0783 ext 29     606-858-8029 (fax)    
http://www.cre8tivegroup.com                 PGP Key ID 0xEE2D47A9

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?XFMail.981118142819.patrick>