I am trying to execute a Python program using Apache. However, Apache will only serve the file and not actually execute it. The permissions on the file are r/w/x and it is
In my case, it was a trivial issue. I had to add this line:
#!/usr/bin/python3
to the top of every .py file I wanted to run.
.py
Then, everything started working correctly.