Install Request Tracker 4 with Nginx

Install spawn-fcgi:
apt-get install spawn-fcgi

Create init script (/etc/init.d/rt):

#!/bin/sh

RTPATH=/opt/rt4/
RTUSER=www-data

case $1 in
start)
echo -n "Starting RT: "
spawn-fcgi -F 3 -u www-data -g www-data -a 127.0.0.1 -p 9000 \
-- /opt/rt4/sbin/rt-server.fcgi
echo
;;

stop)
echo -n "Stopping RT: "
PIDS=`ps axww | awk '/[r]t-server.fcgi/ { print $1}'`
if [ -n "$PIDS" ]
then
echo -n kill -TERM $PIDS
kill $PIDS
echo
else
echo RT not running
fi
;;

restart|force-reload)
$0 stop
$0 start
;;

*)
echo "Usage: /etc/init.d/rt { stop | start | restart }"
exit 1
;;
esac

The spwan-fcgi option -F 3 determines the number of fcgi processes to use.

Create Nginx config (/etc/nginx/sites/sites-available/rt.conf):

server {
listen 80;
server_name rt-server-name;
access_log /var/log/nginx/access.log;

location / {
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param SCRIPT_NAME "";
fastcgi_param PATH_INFO $uri;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_pass 127.0.0.1:9000;
}

location /NoAuth/images {
root /opt/rt4/share/html;
}
}