Q:

Django fastcgi hangs

I'm trying to run Django with fastcgi. With runserver I've already tested that the site works fine in production. When I run
python manage.py runfcgi host=127.0.0.1 port=9500

the daemon runs, but every call just hangs, like this:
pistacchio@amaterasu:~/sites/comesichiama$ python manage.py runfcgi host=127.0.1 port=9500 
pistacchio@amaterasu:~/sites/comesichiama$ wget 127.0.0.1:9500
  --2012-02-18 22:55:37--  http://127.0.0.1:9500/
  Connecting to 127.0.0.1:9500... connected.
  HTTP request sent, awaiting response... 

I don't know what is going on and I have no idea on how to debug an eventual error. Also
python manage.py runfcgi host=127.0.0.1 port=9500 debug=true daemonize=false outlog=out.log errlog=err.log

Doesn't help.

A:

Running FastCGI on port 9500 is not the same as running a webserver -- using wget won't work. I know this from bitter experience, having wasted an afternoon trying the same thing ;)
You need to configure a webserver, for example Apache or Nginx, to serve your site using FastCGI. See the Django deployment docs for FastCGI for help with this. You can then test wget on the port that the webserver is running on e.g. 80 or 8000.

