List for cgit developers and users
 help / color / mirror / Atom feed
From: "Paul W. Rankin" <pwr@bydasein.com>
To: cgit@lists.zx2c4.com
Subject: about-filter in chroot on OpenBSD (httpd + slowcgi)
Date: Sun, 28 Mar 2021 15:35:55 +1000	[thread overview]
Message-ID: <b725a1927cfeb27aecf98860d93b2480@bydasein.com> (raw)

Hello,

I'm running cgit on OpenBSD with httpd + slowcgi and can't seem to get 
the about-filter to work. Both httpd and slowcgi run in the default 
chroot of /var/www.

I've compiled lowdown with "-static -pie" to /var/www/bin/lowdown 
(chroot /bin/lowdown) with permissions:

     -rwxr-xr-x  1 root  bin  1325512 Mar  4 01:38 /var/www/bin/lowdown

In my cgitrc (cgit.conf):

     about-filter=/bin/lowdown
     readme=:README.md

However, upon visiting an About page of a repo that includes a 
README.md, I get only a blank page and the following is logged in 
error.log:

     lowdown: README.md: No such file or directory

Here's the cgit server section in httpd.conf:

	server "git.bydasein.com" {
			listen on * port 80
			listen on * tls port 443
			root "/cgi-bin/cgit.cgi"
			tls {
					certificate "/etc/ssl/bydasein.com.fullchain.pem"
					key "/etc/ssl/private/bydasein.com.key"
			}
			location "/.well-known/acme-challenge/*" {
					root "/acme"
					request strip 2
			}
			location "/robots.txt" {
					root "/htdocs/git.bydasein.com"
					no fastcgi
			}
			location "/favicon.ico" {
					root "/htdocs/git.bydasein.com"
					no fastcgi
			}
			location "/cgit.css" {
					root "/htdocs/git.bydasein.com"
					no fastcgi
			}
			location "/custom.css" {
					root "/htdocs/git.bydasein.com"
					no fastcgi
			}
			fastcgi {
					socket "/run/slowcgi.sock"
					param CGIT_CONFIG "/conf/cgit.conf"
			}
	}

I'm pretty sure I can have this work if I disable the chroot in httpd 
and/or slowcgi, but I'd prefer a solution that doesn't require that.

Does anyone have any ideas? Has anyone managed to get cgit running on 
OpenBSD using httpd + slowcgi with chroot enabled?

Thanks for your time :)

-- 
Paul W. Rankin
https://bydasein.com

The single best thing you can do for the world is delete your social 
media accounts.

             reply	other threads:[~2021-03-28  5:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28  5:35 Paul W. Rankin [this message]
     [not found] ` <87sg4fpulm.fsf@oscarnajera.com>
2021-03-28  9:05   ` Paul W. Rankin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b725a1927cfeb27aecf98860d93b2480@bydasein.com \
    --to=pwr@bydasein.com \
    --cc=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).