summaryrefslogtreecommitdiff
path: root/public/fs
diff options
context:
space:
mode:
authorroot@culturestrings <root@culturestrings>2020-05-19 11:52:57 +0000
committerroot@culturestrings <root@culturestrings>2020-05-19 11:52:57 +0000
commitb70bac42b537a35e3a49bb9aea5ef434c2d8b1a6 (patch)
tree0ab31cea1c183d01ce5808d07d216ac6f7c46c29 /public/fs
parentf0971af853f92a729489a4c46ac4a7d956a24f53 (diff)
downloadculturestrings-b70bac42b537a35e3a49bb9aea5ef434c2d8b1a6.tar.bz2
culturestrings-b70bac42b537a35e3a49bb9aea5ef434c2d8b1a6.tar.xz
web: git.midipix.org: clone repos via https and git-http-backend.
Diffstat (limited to 'public/fs')
-rw-r--r--public/fs/etc/cgit.d/cgitrc.midipix.org3
-rw-r--r--public/fs/etc/nginx/vhosts.d/git.midipix.org.conf23
2 files changed, 25 insertions, 1 deletions
diff --git a/public/fs/etc/cgit.d/cgitrc.midipix.org b/public/fs/etc/cgit.d/cgitrc.midipix.org
index c1c6510..c6ab81e 100644
--- a/public/fs/etc/cgit.d/cgitrc.midipix.org
+++ b/public/fs/etc/cgit.d/cgitrc.midipix.org
@@ -6,8 +6,9 @@ logo=/cgit/cgit.png
root-title=midipix
root-desc=write once with confidence
-clone-url=git://midipix.org/$CGIT_REPO_URL
+clone-url=https://git.midipix.org/$CGIT_REPO_URL
+enable-http-clone=0
enable-git-config=1
section-from-path=1
snapshots=tar.bz2 tar.xz
diff --git a/public/fs/etc/nginx/vhosts.d/git.midipix.org.conf b/public/fs/etc/nginx/vhosts.d/git.midipix.org.conf
index 4b014be..2feaf0c 100644
--- a/public/fs/etc/nginx/vhosts.d/git.midipix.org.conf
+++ b/public/fs/etc/nginx/vhosts.d/git.midipix.org.conf
@@ -9,14 +9,37 @@ server {
server_name git.midipix.org;
root /srv/www/htdocs;
+ # legacy (bookmarked) /cgit.git addresses
location /cgit.cgi {
rewrite ^/cgit.cgi(/.*)$ $1 last;
}
+ # git-http-backend: initial clone GET request
+ location ~ ^(/namespace)?/(.+?)/info(/.*)?$ {
+ try_files $uri @git_http_backend;
+ }
+
+ # git-http-backend: clone POST request
+ location ~ ^(/namespace)?/(.+?)/git-upload-pack {
+ try_files $uri @git_http_backend;
+ }
+
+ # otherwise, cgit
location / {
try_files $uri @cgit;
}
+ location @git_http_backend {
+ include uwsgi_params;
+ uwsgi_modifier1 9;
+ uwsgi_pass unix:/run/uwsgi/git.socket;
+
+ uwsgi_param HTTP_HOST $server_name;
+ uwsgi_param GIT_PROJECT_ROOT /srv/git;
+ uwsgi_param PATH_INFO $uri;
+ uwsgi_param GIT_HTTP_EXPORT_ALL "";
+ }
+
location @cgit {
include uwsgi_params;
uwsgi_modifier1 9;