[Pythonmac-SIG] Python CGI on OS X Apache

Just van Rossum just@letterror.com
Fri, 13 Dec 2002 09:33:21 +0100


Brett Leach wrote:

> I'm sure this has come up before, but I can't find it in my old pythonmac
> emails. I want to try doing some CGI scriptiing in Python, but I don't know
> how to set up the httpd.conf file to do this. Does someone have a working
> httpd.conf file set up for this I could swap in for this? I have OS X 10.2.2
> and all the latest updates from Apple.

I don't think you have to do anything but make sure that your script
- starts with #!/usr/bin/python
- has unix line endings
- is placed in /Library/WebServer/CGI-Executables/ (which is available as
cgi-bin from the client perspective).

Just