Difference between Apache reload and force-reload
I've seen plenty on how reload
gracefully allows HTTP sessions to finish (as opposed to restart
). So what's the difference between
service apache2 reload
and
service apache2 force-reload
Thanks :)
reload
and force-reload
are really just an alias for the same commands.
graceful | reload | force-reload)
if ! $APACHE2CTL configtest > /dev/null 2>&1; then
$APACHE2CTL configtest || true
log_end_msg 1
exit 1
fi
log_daemon_msg "Reloading web server config" "apache2"
if pidof_apache > /dev/null ; then
if $APACHE2CTL graceful $2 ; then
log_end_msg 0
else
log_end_msg 1
fi
fi
;;
It sounds like you're on a Debian or Ubuntu system. Take a look at the Apache init script in /etc/init.d/apache2
; this script implements all the actions associated with the service
command. Look to see the difference between reload
and force-reload
. If you have problems understanding the script, just ask us here.