Skip to content
Multithreaded fastcgi application server
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A simple C++ implementation of fastcgi protocol which enables you to write your web application logic in C++.


Implementing a fastcgi application is easy, one should first create a class that inherits responder, then server class that accepts incoming requests.

#include "../server.h"
#include "../responder.h"
#include <string.h>

class helloWorld : public fastcgi::responder
    void respond()
        const char *test =
                "Content-Type: text/html\n"
                        "Content-Length: 115\n"
                        "<!DOCTYPE html>\n"
                        "\t\t<h1>Hello World!</h1>\n"
        writeBody(test, strlen(test));

int main(int argc, char * argv[])
    fastcgi::server app(new helloWorld);
    return 0;

You must run the application yourself and point the web sever to which port server is listening (default is 8080).

Simple Nginx configuration that should work with fastcgi:

server {
    listen 80;
    server_name localhost;
    location / {
        include fastcgi_params;
        fastcgi_pass localhost:8080;


The build system is CMake and there should be no problem building on Linux. MS Windows is not supported yet.

First clone:

$ git clone

Then make a build directory:

$ mkdir fastcgi/build/
$ cd fastcgi/build/

Run CMake:

$ cmake ..

And Make:

$ make
You can’t perform that action at this time.