Difference between revisions of "Apache - basic control and behaviour"

From Helpful
Jump to: navigation, search
m
m
 
Line 1: Line 1:
 
{{Webdev related}}
 
{{Webdev related}}
<!--
+
 
 +
{{stub}}
  
 
Init scripts:
 
Init scripts:
 
 
* Start
 
* Start
 
 
* Stop
 
* Stop
 
 
* Graceful restart
 
* Graceful restart
** apachectl -k graceful; sends SIGUSR1
+
** idea: minimize downtime while reloading config and re-opening log files
** does a configtest first
+
** first does a <tt>configtest</tt> - doesn't restart if that fails{{verify}}
 +
** then does {{inlinecode|apachectl -k graceful}}, which sends SIGUSR1
 
** advises children to stop after their current requests; each is replaced as soon as they stop {{verify}}.
 
** advises children to stop after their current requests; each is replaced as soon as they stop {{verify}}.
** One of the main ideas is to minimize downtime while reloading config and re-opening log files
 
** things that are not strictly apache children (dynamic scripting and such) may stall for relatively long (consider e.g. keepalive).
 
 
** It's possible for there to be a short time in which no new connections are served
 
** It's possible for there to be a short time in which no new connections are served
 +
** things that are not strictly apache children (dynamic scripting and such) may stall for relatively long {{comment|(consider e.g. keepalive)}}
  
 
* basic/hard restart  
 
* basic/hard restart  
** apachectl -k restart; sends SIGHUP
+
** first does a configtest
** first does a configtest, then does a stop and start
+
** does {{inlinecode|apachectl -k restart}}, which sends SIGHUP
  
  
 
Not all startup/init scripts are set up the same way.  
 
Not all startup/init scripts are set up the same way.  
For example, some interpret restart as graceful restart, others as a hard restart.
+
For example, some interpret {{inlinecode|restart}} as graceful restart, others as a hard restart.
  
  
 
http://httpd.apache.org/docs/2.0/programs/apachectl.html
 
http://httpd.apache.org/docs/2.0/programs/apachectl.html
  
-->
 
  
 
[[Category:Internet]]
 
[[Category:Internet]]

Latest revision as of 14:11, 19 September 2013

Related to web development, hosting, and such: (See also the webdev category)
JS libraries and frameworks

Server stuff:

Dynamic server stuff:

Unsorted

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)

Init scripts:

  • Start
  • Stop
  • Graceful restart
    • idea: minimize downtime while reloading config and re-opening log files
    • first does a configtest - doesn't restart if that fails(verify)
    • then does
      apachectl -k graceful
      , which sends SIGUSR1
    • advises children to stop after their current requests; each is replaced as soon as they stop (verify).
    • It's possible for there to be a short time in which no new connections are served
    • things that are not strictly apache children (dynamic scripting and such) may stall for relatively long (consider e.g. keepalive)
  • basic/hard restart
    • first does a configtest
    • does
      apachectl -k restart
      , which sends SIGHUP


Not all startup/init scripts are set up the same way.

For example, some interpret
restart
as graceful restart, others as a hard restart.


http://httpd.apache.org/docs/2.0/programs/apachectl.html