Inside the cgi-bin folder, I have an experiment.cgi:
use CGI qw(:standard);
print start_html(-title=>"Add Assignment");
print h2("Add New Automated Assignment");
End of script output before headers: experiment.js
I searched for this error and found it was relate to cgi files. So my guess is that apache2 is interpreting experiment.js as a cgi file. I am right in this?
Don't put non-CGI programs in your
cgi-bin. Put them with the rest of your static files.
You'll need to adjust the URL.
src="/js/experiment.js" for example.