I am trying to run a basic CGI Python script on my Apache server. I have a hola.pyscript in my directory /cgi-bin/, I changed the permissions of the file to make it executable, and I changed the owner of the file to apache user. However, I cannot run the Python script to run.
I experimented by creating a Perl script, and, surprisingly, it did very well with the same steps that I took to run the python script.
I donβt think that the problem is in the scripts, because I added a line #!/usr/bin/pythonat the top of the source code, and I successfully executed it from the command line (that is ./hola.py), in which case it worked fine.
It is very strange to me that the Perl script worked where the Python script did not. I searched in several places for a solution for this, but have not yet found it.
I would be happy to publish parts of mine httpd.confif someone sees them.
EDIT:
Before you tell me to look at the error_logserver, there is a line there -
(13) Permission denied: exec of '/var/www/cgi-bin/hola.py' failed
source
share