Read the mod_cgi documentation. Anything in the "cgi-bin" directory (more accurately, anything targeted by a ScriptAlias directive) is processed by the cgi-script handler, which passes files off to sh. It, in turn, expects scripts to start with a shebang line; if they don't, sh processes them as...