Project

General

Profile

Struggling with running Python through mod_fastcgi with flup server.

Added by lapideviridi over 5 years ago

Good day,

I'm having some issues trying to run a Python program, Django to be specific, with lighttpd and mod_fastcgi.

I'm using the Python flup server to run Django as a FastCGI process. If I've understood correctly, lighttpd can start the script by itself when there is a request. I've tried starting it with Python without errors, so it should work. It also creates some unix sockets.

lighttpd starts up fine, but I cannot access the page. It simply continues to load in the browser. Both error and access log remain unchanged.

I've added some relevant files. If I'm correct, mysite.domain.com/mysite.fcgi should be able to access the page.

https://gist.github.com/pmuran/8cac853d23bb4f9cf9e29022129f3cfa

The tutorial I followed is here: http://flask.pocoo.org/docs/0.12/deploying/fastcgi/

Help and suggestions are greatly appreciated.

Debian version:
Linux version 4.9.0-6-amd64 () (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07)

Lighttpd version:
lighttpd/1.4.45 (ssl) - a light and fast webserver
Build-Date: Jan 14 2017 21:07:19


Replies (1)

RE: Struggling with running Python through mod_fastcgi with flup server. - Added by gstrauss over 5 years ago

Please review the documentation on this site. HowToPythonWSGI

At the very least, you haven't loaded "mod_fastcgi" in "server.modules", which means that you haven't looked at the warnings produced when lighttpd starts up. Check the error log. Run lighttpd -f /etc/lighttpd/lighttpd.conf -tt and look at the output.

    (1-1/1)