Go to file
2009-03-24 18:24:11 +01:00
.gitignore Add autotools support 2009-03-10 19:17:16 +01:00
autogen.sh Add autotools support 2009-03-10 19:17:16 +01:00
CMakeLists.txt Add proper build date + fix some warnings 2009-03-10 19:15:28 +01:00
config.h.cmake Remove build date from cmake header 2009-03-24 18:23:48 +01:00
configure.ac Add autotools support 2009-03-10 19:17:16 +01:00
Makefile.am Add autotools support 2009-03-10 19:17:16 +01:00
pam_limits.c Add proper build date + fix some warnings 2009-03-10 19:15:28 +01:00
README.html Remove some trailing whitespaces 2008-07-21 19:14:31 +02:00
spawn-fcgi.1 Initial commit 2008-07-20 22:51:29 +02:00
spawn-fcgi.c Use glib no-return macro 2009-03-24 18:24:11 +01:00

<style language="text/css">
pre       { margin-left: 2em; border: 1px dashed black; padding: 2px }
pre.code  { border: 1px solid blue }
pre.shell { border: 1px dashed green }

To clone this repository, issue the following command:
<pre class="shell">
 $ git-clone <a href="git://stbuehler.de/spawn-fcgi.git">git://stbuehler.de/spawn-fcgi.git</a>

<p style='padding-left: 1em;'>
master: master branch<br />
debian: patch for debian package - will be rebased, so you may need to force updates with -f<br />

<h2>Original home</h2>

<p style='padding-left: 1em;'>
Source based on spawn-fcgi from <a href="http://www.lighttpd.net/">lighttpd</a>,
rewritten for external packaging and some extra features:
	<li>chown/chmod the unix-domain socket</li>
	<li>use /etc/security/limits.conf for limits</li>
	<li>use glib2</li>

<p style='padding-left: 1em;'>
Includes modified code from the <a href="http://www.kernel.org/pub/linux/libs/pam/">Linux-PAM</a> project
for the limits.

<p style='padding-left: 1em;'>
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, ...


<p style='padding-left: 1em;'>
Examples for daemontools (with lighttpd on debian): <br/>

For php5:
<pre class="code">

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

<p style='padding-left: 1em;'>
For turbogears:
<pre class="code">

exec 2&gt;&amp;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/start-tgapp-fcgi.py prod.cfg

<p style='padding-left: 1em;'>
<pre class="code">
#!/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__), "setup.py")):
    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)


<p style='padding-left: 1em;'>
spawn-fcgi is released under a BSD license, which may be found in the source files:
<a href="http://cgit.stbuehler.de/gitosis/spawn-fcgi/tree/spawn-fcgi.c">spawn-fcgi.c</a>:
	Copyright (c) 2004, Jan Kneschke, incremental
	All rights reserved.
<a href="http://cgit.stbuehler.de/gitosis/spawn-fcgi/tree/pam_limits.c">pam_limits.c</a>:
	Copyright (c) Cristian Gafton, 1996-1997, &gt;gafton@redhat.com&lt;
	All rights reserved.