config'in apache for python

Andy Leighton andyl at azaal.dircon.co.uk
Sat Mar 11 14:06:44 EST 2000


On Fri, 10 Mar 2000 15:21:20 -0600, Matthew Barre <mbarre at mac.com> wrote:
>Sorry about not giving enough detial. Maybe this will help
> 
>> Your question is ambiguous, but I'll guess that you're trying
>> to enable the calling of Python scripts ending in .py via CGI,
>
>Yes I'm trying to make it so that when I refer to a cgi script in my cgi bin
>the script is executed instead of being just printed to the browser.
>
>
>> but
>> outside of your configured script aliased directories.
>
>The scripts reside in the cgi-bin directory that apache creates when it is
>installed. I have also created a cgi-bin on a user account and added the
>appropriate lines to access.conf, httpd.conf, and srm.conf to what I would
>think would allow scripts to be executed. Frustratingly the scripts don't
>run from either location.
> 
>> If so, add this to the appropriate section of srm.conf (or httpd.conf,
>> if you follow the new single-file fad).
>> 
>> AddHandler cgi-script .py
>
>I added this line, but I still get the source code being printed to the
>browser. For assurance I tried it in httpd.conf and in srm.conf without
>success.

This is real weird, plain cgi always works for me!  Some questions -

Are you running Apache on a unix variant or Windows?
Do the printenv and test-cgi sample scripts that come with Apache work?
Did you compile it yourself?
Have you checked that mod_cgi is available?

-- 
Andy Leighton => andyl at azaal.dircon.co.uk
"... January is your third most common month for madness" - _Sarah Canary_



More information about the Python-list mailing list