sqlitein the base system, I joked that the BCHS web stack would need to drop
sqliteand investigate new options for a web-stack available purely in the OpenBSD base system. So continuing that joke, I proposed the HOFFA web stack:
httpd, OpenBSD, flat-files, and
This walk-through assumes you've managed to follow one of the many fine OpenBSD installation guides and now have a fresh OpenBSD system with no packages installed.
Begin by copying the template
and in your
block, add a
directive to point to your
directory (this is relative to your
so the absolute path ends up being
Now with the web server configured, it, and the
proxy need to be enabled.
rcctl check slowcgi
may be optional but it doesn't hurt to confirm that it's running)
Populating binaries & libraries in the
With the server and CGI proxy running, binaries need to be put where
they'll be found.
As this is
then create the library directories and copy in the needed libraries.
First, find out which libraries
so we need to create those library directories in the
and copy the libraries in
Now with the web server &
in place, along with the required binaries & libraries, it's time
to write some code.
With this in place, it should now be possible to point your browser at your newly configured script. If your browser is on the same machine you can visit http://localhost/cgi-bin/example.awk or if it's on a remote machine, use its domain-name or IP address http://example.com/cgi-bin/example.awk