Cgit
[=
$ doas pkg_add cgit
=]
Inside /etc/httpd.conf:
[=
server "git.ircnow.org" {
listen on * port 80
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
location * {
block return 302 "https://$HTTP_HOST$REQUEST_URI"
}
}
server "git.ircnow.org" {
listen on * tls port 443
tls {
certificate "/etc/ssl/git.ircnow.org.fullchain.pem"
key "/etc/ssl/private/git.ircnow.org.key"
}
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
no fastcgi
}
location "*~" {
block drop
}
location "/cgit.*" {
root "/cgit"
no fastcgi
}
root "/cgi-bin/cgit.cgi"
fastcgi socket "/run/slowcgi.sock"
}
=]
Unconfirmed: you may need 'no fastcgi' inside the acme block to enable renewal of certs.
Make sure also to edit, like this /var/www/conf/cgitrc:
[=
root-title=Name cGIT repository
root-desc=a fast webinterface for the git dscm
css=/cgit.css
logo=/cgit.png
favicon=/favicon.png
robots=noindex, nofollow
enable-index-links=1
enable-log-filecount=1
enable-log-linecount=1
snapshots=tar.gz tar.bz2 zip
virtual-root=/
scan-path=/repos
=]
Create new repo
[=
cd ~/
mkdir repos
git init --bare my_project.git
doas mv my_project.git /var/www/repos/my_project.git
doas ln -s /var/www/repos/my_project.git /home/user/repos/my_project.git
doas chown user:user /var/www/repos/my_project.git
doas chown user:user /home/user/repos/my_project.git
git clone user@ircnow.org:repos/my_project.git
=]