Python Script Does Not Run Through Cgi On Apache2
I am using apache2 version Apache/2.4.23 I created a simple python script that I want executed via CGI. The script does not execute when I open http://localhost/cgi-bin/hello.py.
Solution 1:
Without the cgi_module
, even code that is chmod +x will not be executable, so uncomment this line:
#LoadModule cgi_module libexec/apache2/mod_cgi.so
And change your Directory to look like this (mine works like this):
<Directory"/Library/WebServer/CGI-Executables">
AllowOverride None
Allow from all
Require all granted
Options ExecCGI
AddHandler cgi-script .py
</Directory>
Post a Comment for "Python Script Does Not Run Through Cgi On Apache2"