How To Restart an Apache Web Server (Linux)

  1. Login to your Web server machine using SSH or telnet.
  2. Su to root.
  3. Run the apache control program:
    apachectl graceful
  4. You can also run the apache control program in this way:
    apachectl restart

To stop it : apachectl stop
Tips:

  1. graceful reloads the configuration files and gracefully restart. Any current connections are allowed to complete.
  2. restart reloads the configuration files and restarts. Any current connections are terminated immediately.
  3. If the server isn't running, these commands will start it up.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
6 + 12 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.