2021-10-23

vger/inetd/nginx on alpineLinux

#gemini

#software

Today I got somewhat adventureous and decided to try the vger/inetd/nginx trick on alpineLinux, too. Of course, I got reminded quite soon, that alpineLinux is built on musl and busybox rather than glibc and GNU userland. But I do like the fact that I can have a Linux system without python and perl and translations and a whole lot of other geek and automatic things. YMMV.

I'll list the commands below. I'm not sure, if everything is right. Replacing /etc/nginx/nginx.conf wholesale is not elegant --- but this is a "does it work?" experiment.

Install some more packages. This list is probably incomplete:

clone the vger git repo and compile the code:

This produces three warnings, the severity of them is unclear to me.

Add a user under which vger shall run (this might be irrelevant after all, possibly changing user is completely ignored):

Create a minimal gemini capsule:

Install vger

Install and configure inetd to listen on port 11965 and call vger on requests, start inetd:

At this point one can ask netcat to reqeust the page:

Very nice! Inetd/vger do their trick!

Create a cert (no garantees that this is really good, it just happen to work):

Configure nginx to accept TLS requests and forward the plain text request to inetd.

As mentioned, this is not elegant. The default nginx.conf is distributed over several files, and I'm sure the configuration can be fit into this structure. But that is not the point here.

I checked with netstat whether everyone involved is listening. And yes, they are:

So, I point a client on my Debian GNU/Linux workstation to the gemini capsule:

And yes indeed, the text appears as hoped for. Not bad for half an afternoon of fiddling!

There might be dragons!

~ew

Home