如何在 nginx 上安装 cgit?

How to install cgit on nginx?

我正在使用以下“https://gist.github.com/stran12/1394757”要点在 nginx 上安装 cgit。我几乎完成了所有步骤。我的 nginx 服务器也已启动 运行。启动 "cgit-fastcgi" 服务时,出现以下错误:

Argument "/tmp/cgi.sock" isn't numeric in foreach loop entry at /usr/bin/spawn-fcgi line 22.

知道如何解决这个错误。

我的 spawn-fcgi 文件是:

#!/usr/bin/perl

use strict; use warnings FATAL => qw( all );

use IO::Socket::UNIX;

my $bin_path = '/usr/bin/fcgiwrap';

my $socket_path = $ARGV[0] || '/tmp/cgi.sock';

my $num_children = $ARGV1 || 1;

close STDIN;

unlink $socket_path; my $socket = IO::Socket::UNIX->new( Local => $socket_path, Listen => 100, );

die "Cannot create socket at $socket_path: $!\n" unless $socket;

for (1 .. $num_children) { my $pid = fork; die "Cannot fork: $!" unless defined $pid; next if $pid;

exec $bin_path;
die "Failed to exec $bin_path: $!\n"; }

我刚刚重新安装了 spawn-fcgi 之后 link

https://github.com/anujsharma12feb/cgit-fcgiwrap-nginx/wiki

它对我有用。

sudo apt-get update

sudo apt-get install spawn-fcgi