[Pythonmac-SIG] cgi newbie

Eric Grundstrom eric_grundstrom@acm.org
Sat, 18 Nov 2000 09:00:51 -0800


I apoligize in advance if this isn't the right forum, but I'm not finding
adequate documentation anywhere.

I'm trying to figure out how to configure Web Sharing to run Python CGI
scripts. It seems that whatever I do I get the error "502 Bad Gateway" with
the message "A CGI or internal server component could not complete the
requested action."

I'm running Mac OS 9.04 on a G4 cube. I've installed MacPython 2.0 and
scripts run fine in the IDE. I'm using TCP/IP and have turned on Web
Sharing. In Web Sharing, I added an action "Launch at Suffix .py" pointing
to PythonInterpreter. I can see my index page fine, but when I run a cgi
script that's when I get the 502 error.

Here are my questions:

1) How do I setup Web Sharing? Should I use "Pre-process", "Post-proces", or
"Filter"?

2) Do I need to do something with paths or aliases or permissions or
extensions so that CGI can find and run the python code?


Thanks so much. Please respond in email
mailto:eric_grundstrom@acm.org

Eric