Last night I migrated my webserver from ZeusWebServer 4.3 to Apache 2.2.3. It’s quite clear that Apache2 isn’t as fast as ZWS, but it is free-software. This counts for an awful lot in my moral outlook. If ZWS ever becomes GPL-ed, then I will start using it again, but until that time…
Unfortunately the source-code for Apache doesn’t come with an init script, however a quick bit of scripting resolves this. Remember to run update-rc.d /etc/init.d/apache2 defaults after saving this script to /etc/init.d.
#!/bin/sh
# Written by Christopher Buckley, 2006.
# Script to control Apachectl within init.d
# change to apachectl's directory ready for execution
cd /usr/local/apache2/bin/
# ready-up debian's init-functions var
. /lib/lsb/init-functions
case $1 in
start)
log_daemon_msg "Starting Apache Server"
./apachectl start
exit $?
;;
reload)
log_daemon_msg "Reloading Apache Configuration"
./apachectl graceful
exit $?
restart)
log_daemon_msg "Restarting Apache"
./apachectl restart
exit $?
;;
stop)
log_daemon_msg "Stopping Apache"
./apachectl stop
exit $?
;;
graceful-stop)
log_daemon_msg "Gracefully Stopping Apache"
./apachectl graceful-stop
exit $?
;;
*)
log_daemon_msg "Usage $1 {start|reload|restart|stop|graceful-stop}"
;;
esac
exit 0
December 9, 2006



















Sorry, no comments yet.