Thank you Sonny for your answer. I think Monkey's fcgi proxy is equivalent to Apache's external mode CGI. When launching manually the python webapp, I get no more error in Monkey log but any request are indefinitely pending (apparently no timeout).
Maybe it is now python related but this sample application is supposed to work. I'll investigate more and post a short how-to for people interested as soon as I get it working. 2013/7/26 Sonny Karlsson <[email protected]> > Hi welcome to the monkey mailing list. > > On Fri, Jul 26, 2013 at 05:12:38AM +0200, Arnaud Durand wrote: > > Did anyone managed to configure the FastCGI to work with python? > > > > I tried to adapt this how-to for Apache ( > > > http://www.electricmonk.nl/docs/apache_fastcgi_python/apache_fastcgi_python.html > ) > > to the Monkey web server with no success. > > > > I'm currently using the following configuration: > > """ > > [FASTCGI_SERVER] > > ServerName py_server1 > > ServerPath /tmp/py-fcgi.sock > > MaxConnections 1 > > > > [FASTCGI_LOCATION] > > ServerNames py_server1 > > Match /cgi-bin/.*\.fcgi > > """ > > > > With the following test.fcgi file: > > """ > > #!/usr/bin/env python > > > > def myapp(environ, start_response): > > start_response('200 OK', [('Content-Type', 'text/plain')]) > > return ['Hello World!\n'] > > > > if __name__ == '__main__': > > from flup.server.fcgi import WSGIServer > > WSGIServer(myapp, bindAddress = '/tmp/py-fcgi.sock').run() > > """ > > > > Log file says [2013/07/26 04:59:44] [ Error] [fastcgi] (fastcgi.c:174: > > errno: No such file or directory) Failed to connect unix socket. > > > > Executing the python script creates the sock and enter an infinite loop > > (expected). If the socket is not deleted, monkey log says [2013/07/26 > > 03:57:23] [ Error] [fastcgi] (fastcgi.c:174: errno: Connection refused) > > Failed to connect unix socket. > > > > I think Monkey is supposed to create the socket before calling python but > > no socket file is created. > > Monkey is running as a standard user. Python script had no troubles > > creating the socket as a standard user. > > > > Thank you for your help. > > While many other web servers interact directly with the fcgi process, > monkey's is only a proxy that speaks the protocol. > You must launch the processes manually. > > Process management has been discussed about before and will probably be > added in the future. > > > _______________________________________________ > > Monkey mailing list > > [email protected] > > http://lists.monkey-project.com/listinfo/monkey > > > -- > Sonny Karlsson >
_______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
