Monday, May 09, 2011

nginx and daemontools

To use nginx with daemontools, the following configuration variable has to be set in your nginx.conf.

daemon off;

The following is the simple /service/nginx/run script to use with daemontools.


exec fghack /usr/sbin/nginx

To get your php-cgi working with nginx, you'd use spawn-fcgi, which is a tool spinned-off from lighttpd.

The /service/php-cgi/run script


exec /usr/bin/spawn-fcgi -n -p 9999 -a -u nginx -g nginx -- /usr/bin/php-cgi