vintage 0.2.0

A multi-threaded FastCGI server
Documentation
events {
}
http {
  server {
    location / {
      # NGINX FastCGI Module documentation:
      # https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#parameters

      # Forward requests to `/` to the fastcgi socket listening at :8000
      fastcgi_pass localhost:8000;

      # The PATH_INFO metavariable is what FastCGI servers expect to use as the request "path".
      # NGINX does not populate it by default.
      # Instead you have to tell it, using a regular expression, what part off the request path should be the PATH_INFO:
      # The second capture is used to populate the $fastcgi_path_info variable.
      fastcgi_split_path_info       ^()(.*)$;

      # NGINX only does not create the CGI params for the FastCGI server by default.
      # Instead, you have to specify what params you want NGINX to send.
      fastcgi_param PATH_INFO       $fastcgi_path_info;
      fastcgi_param QUERY_STRING    $query_string;
      fastcgi_param REQUEST_METHOD  $request_method;
      fastcgi_param CONTENT_TYPE    $content_type;
      fastcgi_param CONTENT_LENGTH  $content_length;
    }

    location /two {
      fastcgi_pass localhost:8001;

      fastcgi_split_path_info       ^()(.*)$;

      fastcgi_param PATH_INFO       $fastcgi_path_info;
      fastcgi_param QUERY_STRING    $query_string;
      fastcgi_param REQUEST_METHOD  $request_method;
      fastcgi_param CONTENT_TYPE    $content_type;
      fastcgi_param CONTENT_LENGTH  $content_length;
    }

    location /three {
      fastcgi_pass localhost:8002;

      fastcgi_split_path_info       ^()(.*)$;

      fastcgi_param PATH_INFO       $fastcgi_path_info;
      fastcgi_param QUERY_STRING    $query_string;
      fastcgi_param REQUEST_METHOD  $request_method;
      fastcgi_param CONTENT_TYPE    $content_type;
      fastcgi_param CONTENT_LENGTH  $content_length;
    }
  }
}