From da20af1a4d88fdaa09fe383c8d9421b77d5e3bc2 Mon Sep 17 00:00:00 2001 From: fmw Date: Fri, 4 Feb 2011 13:00:50 +0100 Subject: [PATCH] updated docs on FastCGI deployment with Lighty Signed-off-by: Armin Ronacher --- docs/deployment/fastcgi.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/deployment/fastcgi.rst b/docs/deployment/fastcgi.rst index fb17eb161..84d09877f 100644 --- a/docs/deployment/fastcgi.rst +++ b/docs/deployment/fastcgi.rst @@ -18,9 +18,10 @@ First you need to create the FastCGI server file. Let's call it #!/usr/bin/python from flup.server.fcgi import WSGIServer from yourapplication import make_app - - application = make_app() - WSGIServer(application).run() + + if __name__ == '__main__': + application = make_app() + WSGIServer(application).run() This is enough for Apache to work, however ngingx and older versions of lighttpd need a socket to be explicitly passed to communicate with the FastCGI @@ -70,7 +71,8 @@ work in the URL root you have to work around a lighttpd bug with the Make sure to apply it only if you are mounting the application the URL root. Also, see the Lighty docs for more information on `FastCGI and Python -`_. +`_ (note that +explicitly passing a socket to run() is no longer necessary). Configuring nginx =================