Django + FCGID On Fedora Core 9 -- What Am I Missing?

- 1 answer

Fedora Core 9 seems to have FCGID instead of FastCGI as a pre-built, YUM-managed module. [I'd rather not have to maintain a module outside of YUM; so no manual builds for me or my sysadmins.]

I'm trying to launch Django through the runfastcgi interface (per the FastCGI deployment docs).

What I'm seeing is the resulting page written to error_log. It does not come back through Apache to my browser. Further, there are a bunch of messages -- apparently from flup and WSGIServer -- that indicate that the WSGI environment isn't defined properly.

  1. Is FastCGI available for FC9, and I just overlooked it?

  2. Does FCGID and flup actually create the necessary WSGI environment for Django? If so, can you share the .fcgi interface script you're using? Mine is copied from mysite.fcgi in the Django docs. The FCGID Documentations page drops hints that PHP and Ruby are supported -- PHP directly, and Ruby through dispatch.fcgi -- and Python is not supported.

Update. The error messages are...

WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! 
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!

Should I abandon ship and switch to mod_python and give up on this approach?



Why don't you try modwsgi? It sounds as the preffered way these days for WSGI applications such as Django.

If you don't wan't to compile stuff for Fedora Core, that might be trickier.

Regarding to your first question, this seems to solve the fcgid configuration problem.

Note that you don't want to run the django application manually like this: python runfcgi, the fcgi is run by apache automatically if the setup is correct and restarted by touch your.fcgi.