cgi is the command that tells fossil it is running as a
web-page supplier for an external http server. (For you web-miesters,
the "cgi" is actually unnecessary if your web environment is set up in
a normal fashion.)
This is the command you will probably use if you want to make a moderate-to-high hit rate public repository (like the fossil project's self-hosted repository) but you'll be using it in the shebang line.
If you need lower level access to the pages fossil generates,
you'll want to look at the