NetBSD of course has a webserver in its base install, called Bozo. A great guide for getting that going is:
Bozo httpd
In short, first update your /etc/inetd.conf to enable http (https later)
http stream tcp nowait:600 _httpd /usr/libexec/httpd httpd /var/www/smurfd.serveblog.net
Restart the inetd. doas service inetd restart
Create a index.html file in /var/www/smurfd.serveblog.net that will be hosted once visiting http://smurfd.serveblog.net
To start using SSL, install the acme client to get a Lets Encrypt certificate
Then create folders and set access rights:
doas pkgin install acme-client
doas mkdir -p /usr/pkg/etc/acme
doas mkdir -p /var/www/smurfd.serveblog.net/.well-known/acme-challenge
doas mkdir -p /usr/pkg/etc/openssl/private
doas chmod 700 /usr/pkg/etc/openssl/private
doas mkdir /usr/pkg/etc/openssl/certs
Then add something like this to: /usr/pkg/etc/acme-client.conf
authority letsencrypt {
api url "https://acme-v02.api.letsencrypt.org/directory"
account key "/usr/pkg/etc/acme/letsencrypt-privkey.pem"
}
domain smurfd.serveblog.net {
domain key "/usr/pkg/etc/openssl/private/smurfd.serveblog.net.key"
domain full chain certificate "/usr/pkg/etc/openssl/certs/smurfd.serveblog.net.fullchain.pem"
sign with letsencrypt
challengedir "/var/www/smurfd.serveblog.net/.well-known/acme-challenge"
}
Adjust the access rights to files and folders:
doas chown root:wheel /usr/pkg/etc/openssl/private/smurfd.serveblog.net.key
Then finally run the acme client to get the certificates:
doas chmod 600 /usr/pkg/etc/openssl/private/smurfd.serveblog.net.key
doas chgrp wheel /usr/pkg/etc/openssl/private
doas chmod 700 /usr/pkg/etc/openssl/private
doas acme-client -v smurfd.serveblog.net
Once that works, and you see it saved a .key and pem file, update /etc/inetd.conf for https, something like:
https stream tcp nowait:600 root /usr/libexec/httpd httpd -U _httpd -Z /usr/pkg/etc/openssl/certs/smurfd.serveblog.net.fullchain.pem /usr/pkg/etc/openssl/private/smurfd.serveblog.net.key /var/www/smurfd.serveblog.net
Then restart inetd,doas service inetd restart
Voila, you are a bozo now