CGI with Awk on OpenBSD Httpd (2020)
box.matto.nl
box.matto.nl
I also highly recommend Michael W Lucas’s book Relayd & Httpd Mastery.
Example: Let's say I want to generate an RTF doc for a power of attorney. I'll tell Apache via .htaccess to treat .rtf documents in that directory as CGI scripts. poa.rtf then is a Python script to process the QUERY_STRING or POST parameters into an RTF template and spit it out. End result is that browser requests poa.rtf and gets a file called poa.rtf -- generated on the fly.
Do you have an idea how you'd accomplish the same trickery in obhttpd? I guess you'd have to have the per-directory config in the main config file?
I don't miss this kind of work ;)
sample index.html.tawk which can generate index.html
```` <p> {{! cat /proc/cpuinfo }} </p>
````
E.g. dump form posts for later (offline) processing: https://codeberg.org/mro/form2xml/src/branch/master/dump.cgi
Edit: nevermind, you're right, just checked it again and the author put the copied awk under /usr/bin inside the chroot