How to make Laragon/apache run python scripts?
So I installed Laragon Lite on windows 10 and added python 3.6.
The problem is when I run a basic .py script it doesnt work. It shows me the content of the file instead
I added to httpd.conf the following line
AddHandler cgi-script .py
But I receive this message
*Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
I tried others paths instead of bin\python\python-3.6.1 but I still receive the same error message
I guess there is a way to tell apache where to find the python interpreter to run .py scripts but I can't figure it out.
Thanks for your help
Does anyone have an answer to this issue please?
After I added the AddHandler in httpd.conf (as you described) it worked for me!
This is my example .py file:
print("content-type: text/html\n\n" )
I guess the initial link to the python exe is missing in your case.
My .py file is in the www folder.