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

vivek kumar gupt_vive at hotmail.com
Fri Jun 6 07:39:17 CEST 2003


>From: Husam <husalwan at sci.kun.nl>
>To: python-list at python.org
>Subject: Newbie: How do you enable python scripts in apache server?
>Date: Thu, 05 Jun 2003 17:16:22 +0200
>
>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:
>
>#!/usr/bin/python
>print "Content-Type: text/plain\n\n"

try: print 'Content-Type:text/html\n\n'

>print "Hello, Python!"
>
>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.
>
>Can anybody points me to the right direction?
>
>Thanks in advance
>
>--
>http://mail.python.org/mailman/listinfo/python-list

_________________________________________________________________
ICICI's NRI services. They make life easy. 
http://server1.msn.co.in/msnspecials/nriservices/index.asp Find out more.






More information about the Python-list mailing list