I am attempting to run a fastcgi app written in C language behind the Nginx web server. The web browser never finishes loading and the response never completes. I am not sur
After your application handles fastcgi-requests correctly, you need to take care of starting the application. nginx will never spawn fcgi processes itself, so you need a daemon taking care of that.
I recommend using uwsgi for managing fcgi processes. It is capable of spawning worker-processes that are ready for input, and restarting them when they die. It is highly configurable and easy to install and use.
http://uwsgi-docs.readthedocs.org/en/latest/
Here is my config:
[uwsgi]
fastcgi-socket = /var/run/apc.sock
protocol = fastcgi
worker-exec = /home/app/src/apc.bin
spooler = /home/app/spooler/
processes = 15
enable-threads = true
master = true
chdir = /home/app/
chmod-socket = 777
This integrates nicely as systemd service, but can also run without.