Results 1 to 8 of 8
  1. #1

    What's the best way to restart apache?

    My server is RH 7.3. I was wondering, is there a difference between running the command:

    /etc/rc.d/init.d/httpd restart

    and:

    /etc/init.d/httpd stop
    /etc/init.d/httpd startssl

    to restart apache, after say, editing the httpd.conf file? I've gotten advise for both. Is one safer/better than the other?

  2. #2
    Join Date
    Apr 2002
    Location
    USA
    Posts
    5,779
    httpd graceful is the best if it is a live server.

  3. #3
    Join Date
    Aug 2002
    Location
    London, UK
    Posts
    9,037
    apachectl graceful

    above is the command i use.
    Matt Wallis
    United Communications Limited
    High Performance Shared & Reseller | Managed VPS Cloud | Managed Dedicated
    UK www.unitedhosting.co.uk | US www.unitedhosting.com | Since 1998.

  4. #4
    Wow...I've never even heard of the above two commands. I gather:

    /etc/rc.d/init.d/httpd restart

    is not a graceful command, and shouldn't be executed on a "live" server?

  5. #5
    Join Date
    Aug 2002
    Location
    London, UK
    Posts
    9,037
    /etc/rc.d/init.d/httpd graceful

    try the above.. if it works, use it.

    graceful does a restart without dropping connections currently made to the server.
    Matt Wallis
    United Communications Limited
    High Performance Shared & Reseller | Managed VPS Cloud | Managed Dedicated
    UK www.unitedhosting.co.uk | US www.unitedhosting.com | Since 1998.

  6. #6
    Join Date
    Dec 2000
    Location
    The Woodlands, Tx
    Posts
    5,962
    That depends on why you want to do it. If you have simply made a change to the config file that you need to become active, then neither restart nor gracefull is needed. Simply make it re-read it's conf files..

    /etc/rc.d/init.d/httpd reload

  7. #7
    Join Date
    Sep 2002
    Location
    Mansfield
    Posts
    314
    /etc/rc.d/init.d/httpd is a script that calls apachectl

    apachectl configtest
    apachectl reload
    GUI admin tools have no honor. It is a good day to vi.

  8. #8
    Originally posted by Webdude
    That depends on why you want to do it. If you have simply made a change to the config file that you need to become active, then neither restart nor gracefull is needed. Simply make it re-read it's conf files..

    /etc/rc.d/init.d/httpd reload
    Ah that's a good tip. In my case, I'm just asking what needs to be done after I edit httpd.conf.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •