I found my problem. Somehow, some way, the cgi_wrapper got changed into a symlink like so...
/var/www/cgi-bin/cgi_wrapper/cgi_wrapper -> /usr/bin/sw-engine-cgi
After I restored the original cgi_wrapper from a backup, then everything started working again.
Not sure if I screwed this up when...