Apache web server and CGI
export at hope.cz
Tue Aug 10 09:06:50 CEST 2004
Jeffrey Froman <jeffrey at I.slack> wrote in message news:<10hf2ugjngver5e at corp.supernews.com>...
> Lad wrote:
> > How can I set up Apache web server to use Python for CGI processing( for
> > file *.py). Thanks for help
> A simple method would be to include the line:
> AddHandler cgi-script .py
> in your httpd.conf. This should work fine so long as your .py files start
> with a proper invocation of the python interpreter (i.e.,
> #!/usr/bin/python). You might also want to look at mod_python
Thank you Jeffrey and Peter for help.
I added AddHandler cgi-script .py to httpd.conf
I also tried to run the test script as Peter suggested but the Apache
says( in error log)
[Tue Aug 10 08:51:32 2004] [error] [client 127.0.0.1] (2)No such file
or directory: script not found or unable to stat: c:/program
The name of script is test.py and is in cgi-bin (Apache subdirectory).
I tried to run the script from IE browser with the command
but without success. I use XP home edition.
Apache runs without problem as I could check it by inserting
BTW, how can I set up a different directory for cgi scripts? For
example I would like to have all my scripts in
Thank you for help
More information about the Python-list