Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Apache restart explained

Answer:

1. apachectl -k restart

Sending a restart signal to the Apache parent process and causes it to kill off its children, but the parent process doesn't exit. It re-reads its configuration files, re-opens any log files and continues serving users.

2. apachectl -k graceful

Similar to (1), except the the child process will exit after they have finished their current request.

3. apachectl -k stop && apachectl -k start

The Apache parent process is killed immediately and the Apache is start up again. This is the only way to cleanup cached program data (e.g. using mod_perl) stored in the Apache parent process, method (1) and (2) do not work in this case since only child process are killed.

Reference: http://httpd.apache.org/docs/2.2/stopping.html

  1. How to restart Apache without disconnecting user
  2. Restart Apache web server in Mac OSX
  3. Turn on expire headers in Apache
  4. How to deny access for Subversion (svn) related files in Apache?
  5. Turn off directory listing in Apache

Leave a Reply

(required)

(required)

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