Restart Apache Server without affecting existing connections

Sponsored Link

Sometimes you want to restart your Apache server after changing some configuration in your virutual hosts,sites etc, but you have few hundred clients currently downloading files from your server and you don’t want to disconnect them.

You need to use the following command

#/etc/init.d/apache2 graceful

This will gracefully restart your Apache with new configuration without affecting your client’s connections.

3 thoughts on “Restart Apache Server without affecting existing connections

  1. Hi,

    Shouldn’t it be: # apache2ctl graceful

    On my Debian install (Lenny), if I type:
    # /etc/init.d/apache2 graceful
    I simply get:
    Usage: /etc/init.d/apache2 {start|stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}.

    Which version of Debian are you referring to?

    Regards
    Pierrick

Leave a comment

Your email address will not be published. Required fields are marked *