#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    15
    Rep Power
    0
    How do you properly shutdown the Httpd Web Server on Linux system and restart it?

    Helicon
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Melbourne, Victoria, Australia
    Posts
    104
    Rep Power
    15
    assuming these paths of course

    /usr/local/apache/bin/apachectl graceful

    or if you're a vicious maniac use

    /usr/local/apache/bin/apachectl restart
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    2
    Rep Power
    0
    # /etc/rc.d/init.d/httpd stop

    # /etc/rc.d/init.d/httpd start
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    To PROPERLY shutdown and restart, use "/path/to/apachectl graceful" at ALL time.

    Don't use:
    # /etc/rc.d/init.d/httpd stop
    # /etc/rc.d/init.d/httpd start
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    2
    Rep Power
    0
    why?
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>why?

    Sometime you think httpd is running but in fact it's not, If you do a "httpd stop", it will possibly corrupt your httpd. On the other hand while you think it's NOT running but in fact it's running, then trying to START it, it increases the chance of corrupting your httpd. Not only that, apachectl also rm your pid file properly.

    apachectl comes with Apache (written by my former co-worker) and it does nothing but to PROPERLY start/stop/restart and debugging. When you doing a "apachectl graceful", you need not to worry whether or not httpd is running, if it's NOT running, it will try to start. If it's already running, it will try to restart. All these works are done for you automatically.

    "man 1 apachectl" to find out more. If it's in /usr/local/apache/s?bin/, add /usr/local/apache to your man path.

IMN logo majestic logo threadwatch logo seochat tools logo