Debian Admin

Debian/Ubuntu Linux System Administration Tutorials,Howtos,Tips

  • Sponsor

  • Categories

  • Sponsor

  • Meta

  • Archives

Restart Apache Server without affecting existing connections

Posted by Admin on October 3rd, 2007

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.

  • Share/Bookmark

2 Responses to “Restart Apache Server without affecting existing connections”

  1. Tony Says:

    Hey,
    Yet another new apache command for me,
    Thanks, I’ve learned alot :>
    ~ Tony

  2. Pierrick Says:

    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 Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>