You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

124 lines
3.7 KiB

  1. .TH spawn-fcgi 1 "21 November 2012"
  2. .
  3. .SH NAME
  4. .
  5. spawn-fcgi \- Spawns FastCGI processes
  6. .
  7. .SH SYNOPSIS
  8. .
  9. .B spawn-fcgi
  10. [options] [ -- <fcgiapp> [fcgi app arguments]]
  11. .P
  12. .B spawn-fcgi
  13. \-v
  14. .P
  15. .B spawn-fcgi
  16. \-h
  17. .
  18. .SH DESCRIPTION
  19. .
  20. \fIspawn-fcgi\fP is used to spawn remote and local FastCGI processes.
  21. .P
  22. While it is obviously needed to spawn remote FastCGI backends (the web server
  23. can only spawn local ones), it is recommended to spawn local backends
  24. with spawn-fcgi, too.
  25. .P
  26. Reasons why you may want to use spawn-fcgi instead of something else:
  27. .IP * 3
  28. Privilege separation without needing a suid-binary or running a server as root.
  29. .IP * 3
  30. You can restart your web server and the FastCGI applications without restarting the others.
  31. .IP * 3
  32. You can run them in different chroot()s.
  33. .IP * 3
  34. Running your FastCGI applications doesn't depend on the web server you are running,
  35. which allows for easier testing of other web servers.
  36. .
  37. .SH OPTIONS
  38. .
  39. \fIspawn-fcgi\fP accepts the following options:
  40. .TP 8
  41. .B \-f <path>
  42. Filename of the FastCGI application to spawn. This option is deprecated and it
  43. is recommend to always specify the application (absolute path) and its parameters after "--";
  44. the fcgiapp parameter is directly used for the exec() call, while for starting the binary given
  45. with \-f /bin/sh is needed (which may not be available in a chroot).
  46. .IP
  47. This option is ignored if fcgiapp is given.
  48. .TP 8
  49. .B \-d <path>
  50. Change the current directory before spawning the application.
  51. .TP 8
  52. .B \-a <address>
  53. IPv4/IPv6 address to bind to; only used if \-p is given too. Defaults to "0.0.0.0" (IPv4).
  54. .TP 8
  55. .B \-p <port>
  56. TCP port to bind to; you cannot combine this with the \-s option.
  57. .TP 8
  58. .B \-s <path>
  59. Path to the Unix domain socket to bind to; you cannot combine this with the \-p option.
  60. .TP 8
  61. .B \-C <children>
  62. (PHP only) Number of children to spawn by setting the PHP_FCGI_CHILDREN
  63. environment variable. Default is not to overwrite the environment variable;
  64. php will spawn no children if the variable is not set (same as setting it to 0).
  65. .TP 8
  66. .B \-F <children>
  67. Number of children to fork, defaults to 1. This option doesn't work with \-n,
  68. have a look at
  69. .BR multiwatch(1)
  70. if you want to supervise multiple forks on the same socket.
  71. .TP 8
  72. .B \-b <backlog>
  73. backlog to allow on the socket (default 1024). This is usually limited by the kernel too,
  74. check sysctl net.core.somaxconn (default 128) for linux.
  75. .IP
  76. backlog is the queue of connections that the kernel accepts before the userspace application sees them.
  77. .TP 8
  78. .B \-P <path>
  79. Name of the PID file for spawned processes (ignored in no-fork mode)
  80. .TP 8
  81. .B \-n
  82. No forking should take place (for daemontools)
  83. .TP 8
  84. .B \-M <mode>
  85. Change file mode of the Unix domain socket (octal integer); only used if \-s is given too.
  86. Defaults to read+write for user and group (0660) as far as the umask allows it.
  87. .TP 8
  88. .B \-?, \-h
  89. General usage instructions
  90. .TP 8
  91. .B \-v
  92. Shows version information and exits
  93. .P
  94. .
  95. The following options are only available if you invoke spawn-fcgi as root:
  96. .TP 8
  97. .B \-c <directory>
  98. Chroot to specified directory; the Unix domain socket is created inside the chroot unless \-S is given.
  99. .TP 8
  100. .B \-S
  101. Create Unix domain socket before chroot().
  102. .TP 8
  103. .B \-u
  104. User ID to change to.
  105. .TP 8
  106. .B \-g
  107. Group ID to change to. Defaults to primary group of the user given for \-u.
  108. .TP 8
  109. .B \-U
  110. Change user of the Unix domain socket, defaults to the value of \-u. (only used if \-s is given)
  111. .TP 8
  112. .B \-G
  113. Change group of the Unix domain socket, defaults to the primary group of the user given for \-U;
  114. if \-U wasn't given, defaults to the value of \-g. (only used if \-s is given)
  115. .
  116. .SH "SEE ALSO"
  117. .
  118. .BR svc(8),
  119. .BR supervise(8),
  120. see http://cr.yp.to/daemontools.html
  121. .P
  122. .BR multiwatch(1),
  123. see http://cgit.stbuehler.de/gitosis/multiwatch/about/