RT 3.8.17 Documentation

Fastcgi server

Go to latest version →

NAME

fastcgi_server - external FastCGI server for RT

USAGE

    # get help
    fastcgi_server -h

    # start a server using defaults
    fastcgi_server

    # start server with custom option
    fastcgi_server --socket /path/to/socket -n 5
    fastcgi_server --port 12345 -n 5

DESCRIPTION

This is a forking external FastCGI server for RT, it can be used with apache and other servers supporting FastCGI technology.

An advantage is lower memory usage because of sharing memory between process. It's easier to setup this with nginx and other servers that can not maintain pool of fastcgi servers, apache can do this.

Disadvantage is that you have to start this server yourself and monitor it, web servers wouldn't be able to restart it on crash.

OPTIONS

-h, --help - get help
-n, --nprocesses - number of processes to start, by default 10
-s, --socket - socket path, by default RT/var/path/fastcgi.sock usually /opt/rt3/var/fastcgi.sock.
-p, --port - port to use instead of socket, by default socket is used.
--pidfile - pid file path, by default RT/var/path/fastcgi.pid.

SERVER CONFIGURATION

nginx

Below you can find example of minimal config for nginx to run RT with this FastCGI server. It's not ideal, but a good enough start.

    worker_processes  1;
    events { worker_connections  1024; }

    pid         /opt/rt3/var/nginx/server.pid;
    error_log   /opt/rt3/var/nginx/error.log debug;

    http {
        access_log  /opt/rt3/var/nginx/access.log;

        server {
            listen       8080;
            server_name  localhost;

            location / {
                root           /opt/rt3/share/html;
                fastcgi_pass   unix:/opt/rt3/var/fastcgi.sock;

                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  PATH_INFO          $fastcgi_script_name;
            }

            location /NoAuth/images/ {
                alias   /opt/rt3/share/html/NoAuth/images/;
            }
        }
    }

lighttpd

Server config:

    server.name = "localhost"
    server.port = 80

    server.username  = "rt_web_user"
    server.groupname = "rt_web_group"

    server.pid-file = "/opt/rt3/var/lighthttpd/server.pid"
    server.errorlog = "/opt/rt3/var/lighthttpd/error.log"

    server.document-root = "/opt/rt3/share/html"

    server.modules = ( "mod_fastcgi" )
    fastcgi.server = (
        "/" => ((
            "socket" => "/opt/rt3/var/fastcgi.sock",
            "check-local" => "disable",
            "fix-root-scriptname" => "enable",
        ))
    )
← Back to index