Hello Florian, "pelzflorian (Florian Pelz)" <[email protected]> writes:
> what did you base your setup on? I've been trying to figure it out from the manual and could have found a config snippet months ago while setting it up. It has not worked as expected since. > with uri-path "/git". I think you want "/" though because you have > its own domain. Or maybe you want "". To keep things simple I'm only trying to get it working with ‘git-http-nginx-location-configuration’ now. So far it appears that it only works when ‘uri-path’ is anything else than "" or "/". Looking at the service definition in ‘gnu/services/version-contro.scm’ "" and "/" are the same the output of nginx' config file. After modifying (string-append "~ /" (string-trim-both uri-path #\/) "(/.*)") to (string-append "~ " (string-trim-both uri-path #\/) "(/.*)") serving and cloning from https://git.example.com/repo(.git) works now. But it doesn't when cgit is enabled and serving repositories in the same path at the same time. Good news is that I'm at a step further now and have it working with: (nginx-server-configuration (server-name '("git.example.com")) (root cgit) (try-files (list "$uri" "@cgit")) (locations (list (nginx-location-configuration (uri "@cgit") (body '("fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi;" "fastcgi_param PATH_INFO $uri;" "fastcgi_param QUERY_STRING $args;" "fastcgi_param HTTP_HOST $server_name;" "fastcgi_pass 127.0.0.1:9000;"))) (git-http-nginx-location-configuration (git-http-configuration)) (nginx-location-configuration (uri "/.well-known") (body '("root /var/www;"))))) (ssl-certificate "/etc/letsencrypt/live/example.com/fullchain.pem") (ssl-certificate-key "/etc/letsencrypt/live/example.com/privkey.pem")) Though I still rather not keep the URL at ‘http://git.example.com/git/REPO(.git)’ for cloning. Is there maybe another way around this?
