Why is my cgi script not being executed?

Hello,
I have, for the first time, a brand new VPS, running Debian. I have installed Apache2 and can indeed see its default page when I connect to my server using a browser.
Now, I’ve tried to make a web application, a simple test, which I’ve put in the same folder than the index.html file (so it’s easy to know the URL). When I enter /test.cgi in the browser, it shows the raw cgi script instead of executing it, like if cgi was disabled (which it isn’t).
The execute bit has been set, the server says cgi is already loaded (when I try to load it manually) and I have the .htaccess file Xojo produced in the same folder as the other necessary files.
Searching on the Internet, some say I must add an “include” statement in the httpd.conf file; however, I don’t have this file and some other websites state it’s a deprecated one (I’m wondering why the one saying to use the httpd.conf file haven’t updated their page, by the way).
I’m lost, looking for help, please.

You need to tell Apache to treat .cgi files as executable scripts:

AddHandler cgi-script .cgi

Thanks for your answer.
I wasn’t sure where to put that line (I searched a bit, but couldn’t find an answer) so I put it in the apache2.conf file (I know this isn’t the correct place, as it may be updated; that’s just for testing).

Then, I got a forbidden page instead; it was written I don’t have permission to access /test.cgi on this server.
The error.log showed this:
Options ExecCGI is off in this directory: /var/www/html/test.cgi
However, I had put the .htaccess file from Xojo which tells “Options +ExecCGI”; this was not enough and I had to add options +ExecCGI in the 000-default.conf file. (I’m writting all this in case someone has the same problem).

After that, I got the internal server error and the log told me it couldn’t find the required shared object. It was needed to install some required libraries. I refreshed the page and… nice, the app finally showed up!

Thank you, you helper me a lot!