spawns FastCGI processes
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
Stefan Bühler 778077f69a replace README with rst formatted one 7年前
.gitignore Add autotools support 11年前
CMakeLists.txt Add proper build date + fix some warnings 11年前 Add autotools support 11年前
README.rst replace README with rst formatted one 7年前 Add autotools support 11年前
config.h.cmake Remove build date from cmake header 11年前 Add autotools support 11年前
pam_limits.c Add proper build date + fix some warnings 11年前
spawn-fcgi.1 Initial commit 12年前
spawn-fcgi.c Use glib no-return macro 11年前



spawn-fcgi prepares the environment for fastcgi applications; it opens a
socket (tcp / unix-domain) on filedescriptor 0, changes uid/gid for process
and unix-domain socket, closes STDIN/STDOUT, ...

Based on spawn-fcgi 1.x from,
rewritten, added some extra features:

* use /etc/security/limits.conf for limits

(The other features were backported to the original spawn-fcgi. Unless you
really need this feature it is recommended to stay with the original,
maintained version.)

Includes modified code from the `Linux-PAM <>`_
project for the limits.


Examples for daemontools or runit (with lighttpd on debian):

* for php5::


exec 2>&1
exec /usr/bin/spawn-fcgi -s /var/run/lighttpd/php-webuser.sock -n -u webuser -U www-data -l -- /usr/bin/php5-cgi

* for turbogears::


exec 2>&1
cd /var/www/tgapp
exec /usr/bin/spawn-fcgi -s /var/run/lighttpd/tgapp.sock -n -u tg-user -U www-data -- /var/www/tg-app/ prod.cfg

* ``/var/www/tg-app/``::

#!/usr/bin/env python
import pkg_resources
import cherrypy
import sys

cherrypy.lowercase_api = True


from cherrypy._cpwsgi import wsgiApp
from flup.server.fcgi import WSGIServer
from os.path import *

import turbogears

if len(sys.argv) > 1:
configfile = sys.argv[1]
elif exists(join(dirname(__file__), "")):
configfile = "dev.cfg"
configfile = "prod.cfg"

turbogears.update_config(configfile=configfile, modulename="tgapp.config")

from tgapp.controllers import Root

cherrypy.root = Root()

cherrypy.server.start(initOnly=True, serverClass=None)



spawn-fcgi is released under a BSD license, which may be found in the source files:

* `spawn-fcgi.c <>`_::

Copyright (c) 2004, Jan Kneschke, incremental
All rights reserved.

* `pam_limits.c <>`_::

Copyright (c) Cristian Gafton, 1996-1997, <>
All rights reserved.