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.
_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to