SCGI

SCGI (Simple Common Gateway Interface) is a stream-based protocol that is particularly simple to implement.

Note

SCGI is the recommended implementation and should be used when available as it takes the best out of GIO asynchronous API.

The implementation uses a gio-2.0/GLib.SocketService and processes multiple requests using non-blocking I/O.

Parameters

The only available parameter is backlog which set the depth of the listen queue when performing the accept system call.

var scgi_server = Server.new ("scgi", backlog: 1024);

Lighttpd

Similarly to FastCGI, Lighttpd can be used to spawn and serve SCGI processes.

server.document-root = var.CWD + "/build/examples/scgi"
server.port = 3003

server.modules += ( "mod_scgi" )

scgi.server = (
    "" => (
        "valum" => (
            "socket"      => var.CWD + "/valum.sock",
            "bin-path"    => var.CWD + "/build/examples/scgi/scgi",
            "check-local" => "disable",
        )
    )
)

Apache

Apache can serve SCGI instances with mod_proxy_scgi.

ProxyPass / scgi://[::]:3003

Nginx

Nginx support the SCGI protocol with ngx_http_scgi_module and can only pass requests over TCP/IP and UNIX domain sockets.

location / {
    scgi_pass [::]:3003;
}