【问题标题】:nginx 1.21 + cgit 0.10 - upstream prematurely closed FastCGI stdoutnginx 1.21 + cgit 0.10 - 上游过早关闭 FastCGI 标准输出
【发布时间】:2014-01-25 21:46:56
【问题描述】:

我正在尝试使用 nginx 和 fastcgi 设置 cgit 0.10。不幸的是,响应是 502。错误日志中写入了以下消息:

[error] 30956#0: *1 upstream prematurely closed FastCGI stdout while reading response header from upstream, client: **, server: **, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "**"</i>

我的nginx站点配置如下:

   server {
      ...
      root /var/www/cgit/;
      proxy_redirect off;

      location ~* ^.+\.(css|png|ico)$ {
          expires 30d;
      }

      location / {
            include fastcgi_params;
            fastcgi_param  SCRIPT_FILENAME  /var/www/cgit;
            fastcgi_pass   unix:/var/run/fcgiwrap.socket;
            fastcgi_param    PATH_INFO $uri;
            fastcgi_param    QUERY_STRING  $args;
      }
}

/var/www/cgit$ ls -al

drwxr-xr-x 2 www-data www-data    4096 Jan 25 22:22 .
drwxr-xr-x 5 www-data www-data    4096 Jan 25 22:21 ..
-rwxr-xr-x 1 www-data www-data 4786733 Jan 25 22:22 cgit.cgi
-rw-r--r-- 1 www-data www-data   12395 Jan 25 22:22 cgit.css
-rw-r--r-- 1 www-data www-data    1488 Jan 25 22:22 cgit.png
-rw-r--r-- 1 www-data www-data    1078 Jan 25 22:22 favicon.ico
-rw-r--r-- 1 www-data www-data      47 Jan 25 22:22 robots.txt

有人知道,出了什么问题吗?我也尝试提高超时限制,但没有成功。

谢谢!

【问题讨论】:

    标签: nginx fastcgi cgit


    【解决方案1】:

    好的,我解决了我的问题。我刚刚从源代码更新到最新的 fcgiwrap 版本。不幸的是,我无法让它与 debian 包一起使用。

    【讨论】:

      猜你喜欢
      • 2019-08-11
      • 2016-05-26
      • 1970-01-01
      • 2013-04-21
      • 2015-02-08
      • 2017-07-22
      • 2018-09-21
      • 2019-05-15
      • 2012-12-12
      相关资源
      最近更新 更多