Suggestions for a Gemini server
Omar Polo op at omarpolo.com
Mon Dec 20 08:28:59 GMT 2021
Jason Evans <jsevans@mailfence.com> writes:
> Hi all,
>
> I've been running molly-brown for some time and I really like its
> flexibility when it comes to handling funky mime types. I've been hosting
> a gemini mirror to textfiles.com for a while and lot of these files
> have random
> file extensions but they are actually all plain text files. With molly, I
> can define mime types like this:
>
> [MimeOverrides]
> "atom.xml$" = "application/atom+xml"
> "rss.xml$" = "application/rss+xml"
> ".$" = "text/plain"
> ".gmi$" = "text/gemini"
> ".tgz$" = "application/gzip"
> ".zip$" = "application/zip"
> ".tar.gz$" = "application/gzip"
>
>
> That way anything that isn't defined is automatically assumed to be
> "text/plain" which works great for me.
>
> I tried using gmnisrv and it has some wonderful features like certificate
> generation and the ability to create multiple capsules however, custom
> mime types must be managed manually which means that I would probably need
> to rename every file in the textfiles collection to .txt or .gmi which I
> really don't want to do.
>
> I'm looking for suggestions for a server that can give me all of these
> functions together in one place. Thanks!
shameless self-promotion :)
I've never used molly brown nor gmnisrv, but my server gmid[0] has
location blocks and settings customizable per-location block. That
means that you can either
server "example.com" {
cert "..."
key "..."
root "..."
# set the default mime to text/plain
default type "text/plain"
}
or even
server "example.com" {
cert "..."
key "..."
root "..."
location "/text-files/*" {
default type "text/plain"
}
}
to change the `default type' only for files that matches "/text-file/*".
It's also possible to define custom mime-types per extensions using the
`map mime-type to-ext extension', see the manpage for usage and
examples.
Regarding the automatic renewal of certificates, there's nothing in the
current last version (v1.7.5) but in -master there's an helper script in
contrib/ to automatically renew the certificates (it's meant to be ran
from a crontab or similar) and I'd like to tag the 1.8 with the new
year.
[0]: gemini://gmid.omarpolo.com
or https://gmid.omarpolo.com
Archive home | About this archive