diff options
author | root@culturestrings <root@culturestrings> | 2020-05-19 12:11:44 +0000 |
---|---|---|
committer | root@culturestrings <root@culturestrings> | 2020-05-19 12:13:22 +0000 |
commit | 535e173a9cae99d631b4ecf6d75fedfc1c87e3f9 (patch) | |
tree | 56f495d3b8d0e699defb2addc215ec874da98914 /public | |
parent | e8d6b1f142cb907be4c520a7f0a708a04ad7cd22 (diff) | |
download | culturestrings-535e173a9cae99d631b4ecf6d75fedfc1c87e3f9.tar.bz2 culturestrings-535e173a9cae99d631b4ecf6d75fedfc1c87e3f9.tar.xz |
web: git.foss21.org: clone repos via https and git-http-backend.
Diffstat (limited to 'public')
-rw-r--r-- | public/fs/etc/cgit.d/cgitrc.foss21.org | 3 | ||||
-rw-r--r-- | public/fs/etc/nginx/vhosts.d/git.foss21.org.conf | 29 |
2 files changed, 28 insertions, 4 deletions
diff --git a/public/fs/etc/cgit.d/cgitrc.foss21.org b/public/fs/etc/cgit.d/cgitrc.foss21.org index 64771ac..8da72a4 100644 --- a/public/fs/etc/cgit.d/cgitrc.foss21.org +++ b/public/fs/etc/cgit.d/cgitrc.foss21.org @@ -6,8 +6,9 @@ logo=/cgit/cgit.png root-title=foss21 root-desc=Quality FOSS for the 21st Century -clone-url=git://foss21.org/$CGIT_REPO_URL +clone-url=https://git.foss21.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.foss21.org.conf b/public/fs/etc/nginx/vhosts.d/git.foss21.org.conf index 3b0cf57..af9490c 100644 --- a/public/fs/etc/nginx/vhosts.d/git.foss21.org.conf +++ b/public/fs/etc/nginx/vhosts.d/git.foss21.org.conf @@ -9,24 +9,47 @@ server { server_name git.foss21.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; uwsgi_pass unix:/run/uwsgi/cgit.socket; - uwsgi_param CGIT_CONFIG "/etc/cgit.d/cgitrc.foss21.org"; - uwsgi_param PATH_INFO $uri; - uwsgi_param QUERY_STRING $args; uwsgi_param HTTP_HOST $server_name; + uwsgi_param CGIT_CONFIG /etc/cgit.d/cgitrc.foss21.org; uwsgi_param SCRIPT_FILENAME $document_root/cgit.cgi; + uwsgi_param PATH_INFO $uri; + uwsgi_param QUERY_STRING $args; } ssl_certificate /etc/nginx/certs.d/culturestrings.org/ssl/fullchain.pem; |