0
smart httpとnginxを使用してgit repo用のサーバーを設定しようとしています。 私はhttps://stackoverflow.com/a/17553364の答えに従った。nginxでスマートhttp gitサーバーをセットアップしようとしました: "要求されたURLはエラー502を返しました"
けれども、私はgit clone http://mydomian.de/git/test
を実行すると、それが返されます。
Cloning into 'xmlTest' ...
fatal: unable to access 'http://mydomain.de/git/test/': The requested URL returned error: 502
とnginxのエラーログのプリントを:
2016/11/16 07:29:11 [error] 19219#0: *11 connect() failed (111: Connection refused) while connecting to upstream, client: myip, server: mydomain.de, request: "GET /git/test/info/refs?service=git-upload-pack HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "mydomain.de"
私は/ SRV/gitの中で名前テストで裸のgitリポジトリを配置/。
git-coreをインストールしました。
私はfcgiwrapがsudo service fcgiwrap status
戻りbecuase、実行されていると思う:
[ ok ] Checking status of FastCGI wrapper: fcgiwrap running.
これは私がnginxのために使用している設定の関連する部分である:
server {
root /usr/share/nginx/mydomain/www;
index index.html index.htm;
# Make site accessible from mydomain.de
server_name mydomain.de;
access_log /var/log/nginx/mydomain.access.log;
error_log /var/log/nginx/mydomain.error.log;
proxy_set_header X-Forwarded-For $remote_addr;
location ~ /git(/.*) {
# fcgiwrap is set up to listen on this host:port
fastcgi_pass localhost:9001;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
# export all repositories under GIT_PROJECT_ROOT
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT /srv/git;
fastcgi_param PATH_INFO $1;
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
}
感謝事前に任意の助けのために。 )