Newbie: How do you enable python scripts in apache server?

Erhan Ekici erhan at uzem.itu.edu.tr
Thu Jun 5 11:37:30 EDT 2003


Quoting Husam <husalwan at sci.kun.nl>:

> Hi,
> I have apache server running on redhat 9 and wants to run python scripts
> with it. I made a test script test.py and chmod to 777. The script sits
> in the root directory of the www-site. The script is this:

> Although the script executes properly in konsole terminal, the problem
> is when I try to execute this script in netscape like this:
> http://localhost/test.py
> 
> the script is showing as plain text.

Hello,

For Unix users: often a CGI script has to have the executable attribute set 
("chmod +x script.py") and/or have a special extension or be in a special CGI 
directory.You can try to put your CGI file in webserver cgi-bin directory.Then 
call it
http://localhost/cgi-bin/test.py

  
Erhan Ekici
İTÜ Uzaktan Eğitim Merkezi
E-Posta : erhan at uzem.itu.edu.tr
Mobil   : +90 544 6502770

www.uzem.itu.edu.tr







More information about the Python-list mailing list