My CGI scripts (written in python) seem to only display the code. I've followed essentially every tutorial online for CGI and read all the trouble shooting articles but to no avail. I have tried downloading other files to make sure it wasn't my code that was causing the issue).
I've added the handler in apache2.conf
and have tried putting files in both /var/www/html
and /var/etc/cgi-bin
. The files in /var/www/html
just display the code and /var/etc/cgi-bin
just says File not found
.
I have also made sure to add executable permissions with chmod 755 <filename>
, but that didn't work either.
I have also made sure to have appropriate import statements and the #!
statement.
Any ideas on how I could fix this?