我正在尝试使用nginx和fastcgi设置cgit 0.10。不幸的是,回答是502。在error.log中写入以下消息:
[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有没有人知道出了什么问题?我还试图提高超时限制,但没有成功。
谢谢!
发布于 2014-01-27 01:06:02
好了,我解决了我的问题。我刚刚从源码更新到了最新的fcgiwrap版本。不幸的是,我不能让它与debian包一起工作。
https://stackoverflow.com/questions/21356663
复制相似问题