From 2d93ae19ca7bd7afd3a82f65fdb95bb1ef55228b Mon Sep 17 00:00:00 2001 From: Luka Hietala Date: Wed, 26 Nov 2025 18:52:49 +0200 Subject: [PATCH] add docs nginx proxy with fastcgi to git daemon --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index b4b1120..3c979a3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ Fast webview using pygit2 (lib2git) bindings. For my personal use, for now +BETTER DOCS SOON + image ## Setup @@ -39,6 +41,20 @@ server { proxy_pass http://unix:/home/USERNAME/lipasto/py-gitweb.sock; } } + +# if gitdaemon +location ~ ^/git/([^/]+)(/.*)?$ { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; + fastcgi_param GIT_PROJECT_ROOT /srv/git; + fastcgi_param GIT_HTTP_EXPORT_ALL "1"; + fastcgi_param PATH_INFO /$1$2; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param QUERY_STRING $query_string; + fastcgi_pass unix:/var/run/fcgiwrap.socket; +} + +# sudo apt install fcgiwrap spawn-fcgi ``` Note: Libgit2 might have some issues with git.safe dir settings. If you run into issues, try setting `git config --global --add safe.directory '*'` -- 2.47.3