Justin Ryan <[EMAIL PROTECTED]> schrieb am Thu, Sep 26, 2002 at 09:00:38AM -0500:
> I first stuck the script(s) in /usr/lib/cg-bin without modifying apache
> configuration.  I tried adding the ScriptAlias line and <Directory>
> entry from apache's global config to the <VirtualHost> - no cigar.

I've done it this way:

        <Directory /home/dkg/www/python>
                AddHandler python-program .py
                PythonHandler mptest
                PythonDebug On
        </Directory>


> #!/usr/bin/python
> print "Content-Type: text/plain\n\n"
> print "Hello Web!"

Try the following code:


from mod_python import apache 

def handler(req):

        req.content_type = "text/plain"
        req.send_http_header()
        req.write("High, Girls!")

        return apache.OK


HTH,
 #dkg
-- 
# Schwanzlaengenvergleich ;)
echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; \
cat /proc/cpuinfo|grep MHz|awk '{print $4"/30 +";}'; free|grep '^Mem' \
|awk '{print $3"/1024/3+"}'; df -P -k -x nfs | grep -v 1k \
| awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END \
{print s/1024/50"/15+70";}'`|bc|sed 's/\(.$\)/.\1cm/'


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to