Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Ubuntu Server 9.04 and I've installed Apache2 on it.

I want to restart my Apache gracefully but I only can restarting it using this command:

/etc/init.d/apache2 restart

And if I'm not wrong it doesn't have graceful option parameter.

I don't have this command installed:




sudo /etc/init.d/apache2 graceful
 * Usage: /etc/init.d/apache2 {start|stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}
share|improve this question
up vote 3 down vote accepted

On Ubuntu apachectl is /usr/sbin/apache2ctl

share|improve this answer
@lain Ok thanks. Is it normal that I don't get any feedback message after the command ? For example, when I use "apache2 restart" I can see 2 lines "Apache restarting..." but apache2ctl just doesn't provide any additional info. Maybe just because everything went well ? – Patrick Oct 8 '10 at 7:22
If there were any errors apache2ctl would report them. – Iain Oct 8 '10 at 7:44

/etc/init.d/apache2 accepts graceful parameter. reload parameter does the same. You can use either:

/etc/init.d/apache2 graceful


/etc/init.d/apache2 reload

to pass graceful parameter to apache2ctl


It exists. look at source of /etc/init.d/apache2:

graceful | reload | force-reload)
    if ! $APACHE2CTL configtest > /dev/null 2>&1; then
                $APACHE2CTL configtest || true
                log_end_msg 1
                exit 1
            log_daemon_msg "Reloading web server config" "apache2"
    if pidof_apache > /dev/null ; then
                if $APACHE2CTL graceful $2 ; then
                    log_end_msg 0
                    log_end_msg 1
share|improve this answer
uhm.. not really apache2 graceful doesn't exist.. see my updated question. – Patrick Oct 8 '10 at 8:13
About apache2 reload: is it exactly like graceful ? – Patrick Oct 8 '10 at 8:14
Yes it does. See my edit. – Casual Coder Oct 8 '10 at 8:57
ok. Maybe your version does not have it. I am working now on 10.04. But reload should do the same as graceful if in doubt look at source of /etc/init.d/apache2 it should call at some point $APACHE2CTL graceful. – Casual Coder Oct 8 '10 at 9:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.