Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: How to use Python as web script with Apache in windows 10 |
|
Author |
|
sunilpandya
Joined: 08 Sep 2016 Posts: 12 Location: India
|
Posted: Fri 11 Sep '20 16:51 Post subject: How to use Python as web script with Apache in windows 10 |
|
|
I want to know what should be configuration of using python- 3.8.5 to use with apache 2.4.46.0 Request to help me. That is I want to use Python as CGI Script in place of PHP |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sun 13 Sep '20 19:43 Post subject: |
|
|
Pretty simple, same as any other cgi file.
In httpd.conf add .py to the AddHandler cgi-script line.
AddHandler cgi-script .cgi .pl .py
First line of the script/s need to have a shebang informing the Apache of the location to and including python.exe on the server.
#!/location/of/python.exe |
|
Back to top |
|
|
|
|
|
|