1 The application could be quite easily made to use FastCGI. Unlike normal CGI,
2 with FastCGI (fcgi), the process is executed once, and continues to run. The
3 process will receive responses from the browser in the response loop. Hence,
4 sensor data can be read in another thread while the response loop runs.
7 Compile fastcgi_test.c with: (the libfcgi-dev package must be installed)
8 gcc fastcgi_test.c -lfcgi -o fastcgi_test
11 Use the config files in -etc-nginx (representing files in /etc/nginx)
14 /etc/init.d/nginx restart
17 spawn-fcgi -p9005 -n ./fastcgi_test
19 You can see the results at:
20 http://your.domain/cgi