我git-http-backend
通过 nginx fastcgi 代理提供 git repos 服务。nginx 配置如下:
server {
listen 443 ssl;
server_name git.example.com;
auth_basic "Git Access";
auth_basic_user_file /etc/nginx/.htpasswd_git;
error_log /var/log/nginx-git-error.log;
access_log /var/log/nginx-git-access.log;
client_max_body_size 0;
root /var/git/;
location ~ /git(/.*) {
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
fastcgi_param GIT_PROJECT_ROOT /var/git;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $1;
fastcgi_read_timeout 600;
}
}
从测试来看,如果一次有多个请求,代理就会失败(代码为 504),而且谷歌搜索似乎证实了我的怀疑,即git-http-backend
无法支持多个请求。
我该如何设置以便可以同时向 git repo 发出多个请求?