This is probably good thread to mention BCHS, it’s a sane software stack comprised of OpenBSD, C, httpd and SQLite.
A related rabbit hole that goes deep
That is more of a parallel path, as BSD awk’s usually don’t implement these GNU awk extensions.
Also, why the chroot? hopefully this behavior can be turned off. trying to copy over the interpreter and hoping ldd catches all the linked components seems troublesome for no real benefit. what would the scripts even usefully do in such a limited context?
httpd with chroot is the default on OpenBSD. The philosophy is: why give an attacker able to compromise your web-app access to your entire system?
Nice reminder how ubiquitous environment variables were (and still are).