First off a 500 error you get means you configured the script wrong in some way. You have to display more info on how you configured cause right now it seems the configuration is wrong so going farther ahead like putting it into html would be pointless.
Second of all, SSI'ing via <<--include virtual a CGI is a no no... the virtual tag is only used for html type pages (or php for that matter).
Anyhow you have to use an <--exec tag for the cgi pages that you are trying to run. HOWEVER this is the catch, your cgi must work first in order for you to even think about SSI'ing the CGI
Anyhow post more info on your coding and it should be easier to help you out.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.