diff options
author | June McEnroe <june@causal.agency> | 2021-09-30 19:37:37 +0000 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-09-30 19:39:24 +0000 |
commit | 584184c64544cb9a0ac57cdfe210bad3ed4f1529 (patch) | |
tree | 7c4e4ca02e3d94594e604c47052b255d12da8074 /OpenBSD/www/cgit-causal-agency/pkg/README | |
parent | Move FreeBSD ports under FreeBSD directory (diff) | |
download | ports-584184c64544cb9a0ac57cdfe210bad3ed4f1529.tar.gz ports-584184c64544cb9a0ac57cdfe210bad3ed4f1529.zip |
OpenBSD: Add port for cgit-causal-agency
Diffstat (limited to '')
-rw-r--r-- | OpenBSD/www/cgit-causal-agency/pkg/README | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/OpenBSD/www/cgit-causal-agency/pkg/README b/OpenBSD/www/cgit-causal-agency/pkg/README new file mode 100644 index 0000000..816ad9e --- /dev/null +++ b/OpenBSD/www/cgit-causal-agency/pkg/README @@ -0,0 +1,74 @@ +$OpenBSD: README,v 1.5 2018/09/04 12:46:24 espie Exp $ + ++----------------------------------------------------------------------- +| Running ${PKGSTEM} on OpenBSD ++----------------------------------------------------------------------- + +Cgit config +=========== +By default, the cgitrc config file is searched in ${PREFIX}/conf/cgitrc. +Refer to cgitrc(5) for the syntax. + +Webserver config +================ + +OpenBSD httpd +------------- +server "default" { + listen on egress port 80 + + # don't serve static files from cgit CGI: cgit.css and cgit.png + location "/cgit.*" { + root "/cgit" + no fastcgi + } + root "/cgi-bin/cgit.cgi" + fastcgi socket "/run/slowcgi.sock" +} + +Nginx +----- +An example nginx config snippet is provided below, to run with +slowcgi: + +server { + server_name cgit.example.com; + access_log logs/cgit-access main; + error_log logs/cgit-error warn; + location ~ /cgit.(png|css) { + root /var/www/htdocs; + } + location / { + rewrite /(.*) /cgi-bin/cgit.cgi/$1; + } + location /cgi-bin/ { + fastcgi_pass unix:run/slowcgi.sock; + fastcgi_split_path_info ^(/cgi-bin/[^/]+)(.*); + fastcgi_param PATH_INFO $fastcgi_path_info; + include fastcgi_params; + } +} + +Apache config +------------- + +This config snippet works with Apache: + +ScriptAlias /cgit /cgi-bin/cgit.cgi +<Location "/cgit"> + AllowOverride None + Options +ExecCGI + Order allow,deny + Allow from all +</Location> + + +snapshots +--------- +Nginx and OpenBSD httpd use chroot(2). + +For .tar.gz snapshot support a static binary in $chroot/bin/gzip is required. + + cd /usr/src/usr.bin/compress + make clean && make LDFLAGS="-static -pie" + cp obj/compress $chroot/bin/gzip |