@tartley We ($DAYJOB) deliver a software package on both embedded and server platforms. We have been using Nginx on the embedded for several years, but were running Apache on RHEL platforms before switching over to Nginx on Ubuntu, mainly to make them as similar as possible, to ease maintenance.
The server platform has two products that can be installed side-by-side, and some of the common parts (routing default URLs to the correct product) was a simple CGI script doing a redirect. That's what I am rewriting, since Nginx doesn't do CGIs.
It's proprietary software, but the CGI scripts are of course readable, being scripts. I'll add links to the packages in a comment to this.