books
Free Books / Computers / Practical mod_perl /

previous page: 5.3.3. Finding the Right Apache PID
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 5.5. Validating Server Configuration

5.4. Using apachectl to Control the Server




Description

This section is from the "Practical mod_perl" book, by Stas Bekman and Eric Cholet. Also available from Amazon: Practical mod_perl

The Apache distribution comes with a script to control the server called apachectl, installed into the same location as the httpd executable. For the sake of the examples, let's assume that it is in /home/httpd/httpd_perl/bin/apachectl.

All the operations that can be performed by using signals can also be performed on the server by using apachectl. You don't need to know the PID of the process, as apachectl will find this out for itself.

To start httpd_perl:

panic% /home/httpd/httpd_perl/bin/apachectl start

To stop httpd_perl:

panic% /home/httpd/httpd_perl/bin/apachectl stop

To restart httpd_perl (if it is running, send HUP; if it is not, just start it):

panic% /home/httpd/httpd_perl/bin/apachectl restart

Do a graceful restart by sending a USR1 signal, or start it if it's not running:

panic% /home/httpd/httpd_perl/bin/apachectl graceful

To perform a configuration test:

panic% /home/httpd/httpd_perl/bin/apachectl configtest

There are other options for apachectl. Use the help option to see them all.

panic% /home/httpd/httpd_perl/bin/apachectl help

It is important to remember that apachectl uses the PID file, which is specified by the PidFile directive in httpd.conf. If the PID file is deleted by hand while the server is running, or if the PidFile directive is missing or in error, apachectl will be unable to stop or restart the server.

 

Continue to:

  • prev: 5.3.3. Finding the Right Apache PID
  • Table of Contents
  • next: 5.5. Validating Server Configuration

Books by Stas Bekman:















TOP
previous page: 5.3.3. Finding the Right Apache PID
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 5.5. Validating Server Configuration

Topics

  • Animals
  • Architecture
  • Arts
  • Business
  • Computers
  • Crafts
  • Fairy Tales
  • Finance
  • Flora and Plants
  • Cooking
  • Gardening
  • Health and Healing
  • History
  • Home Improvements
  • Languages
  • New Age
  • Novels
  • Real Estate
  • Reference
  • Religion
  • Science
  • Society
  • Sports
  • Travel
  • Outdoors


Search

My Books

Headaches Begone! A Systemic Approach To Healing Your Headaches
Don't Let Your Bike Seat Ruin Your Sex Life Book

Discover

  • Answers FAQ

[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007-2021 StasoSphere.com