安装配置Nginx与GitWeb运行错误,检测Nginx Logs:

2017/04/06 20:03:18 [error] 32701#32701: *1 FastCGI sent in stderr: "Can't locate CGI.pm in @INC (you may need to install the CGI module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/gitweb/gitweb.cgi line 13.^M  
BEGIN failed--compilation aborted at /usr/share/gitweb/gitweb.cgi line 13" while reading response header from upstream, client: 210.129.50.23, server: git.venmos.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "git.venmos.com", referrer: "https://git.venmos.com/"  
2017/04/06 20:03:18 [error] 32701#32701: *1 upstream prematurely closed FastCGI stdout while reading response header from upstream, client: 210.129.50.23, server: git.venmos.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "git.venmos.com", referrer: "https://git.venmos.com/"  

发现是因为没有CGI.pm, 于是使用Apt安装:

$apt install libcgi-pm-perl

重启Nginx与FCGiwrap,一切正常.