Differences between revisions 7 and 8
Revision 7 as of 2023-04-03 02:23:09
Size: 1856
Comment:
Revision 8 as of 2023-04-05 17:34:37
Size: 1820
Comment:
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
Most [[Linux]] distributions offer a `fcgiwrap` package. Consider also installed `spawn-fcgi` at the same time (see below).

[[Linux/Systemd|Enable and start]] `fcgiwrap.socket`.
Most [[Linux]] distributions offer a `fcgiwrap` package. Consider also installing `spawn-fcgi`.
Line 21: Line 19:
== Configuration == == Setup ==

[[Linux/Systemd|Enable and start]] `fcgiwrap.socket`.

Fcgiwrap

fcgiwrap(8) is a simple wrapper script around a FastCGI implementation. It comes from the Lighttpd project.


Installation

Most Linux distributions offer a fcgiwrap package. Consider also installing spawn-fcgi.


Setup

Enable and start fcgiwrap.socket.


Usage

NGINX

See here for details.

However, it should be noted that upstream recommends using spawn-fcgi(1), rather than fcgiwrap(8) directly. With it, no configuration is necessary and the server can be started like:

spawn-fcgi -n -u www-data -p 9000 -- /usr/bin/fcgiwrap -f

Similarly, if using Docker or Podman container to serve a FastCGI server, the below image recipe can be used.

FROM alpine:latest
RUN apk add spawn-fcgi fcgiwrap
COPY myapp /myapp
EXPOSE 9000
WORKDIR /myapp
CMD spawn-fcgi -n -p 9000 -- /usr/bin/fcgiwrap -f

See here for details.

Path_Info

Upstream has noted that fcgiwrap(8) was written before NGINX offered fastcgi_split_path_info.

"PATH_INFO passed from the web server is ignored and instead is parsed out of SCRIPT_FILENAME (or DOCUMENT_ROOT + SCRIPT_NAME)."

So, the solution is to...

  1. set these variables directly
  2. copy fastcgi_params to fcgiwrap_params and comment out the lines that set DOCUMENT_ROOT and SCRIPT_NAME.

    include       fcgiwrap_params;

    fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
    #or
    fastcgi_param DOCUMENT_ROOT /usr/libexec/git-core/
    fastcgi_param SCRIPT_NAME   git-http-backend


CategoryRicottone

Fcgiwrap (last edited 2023-04-22 20:21:59 by DominicRicottone)