mod_python

Peter peter at commonlawgov.org
Tue Oct 11 06:05:04 EDT 2005


deelan wrote:

>Python_it wrote:
>(...)
>  
>
>>But my problem is where I have to place te following code in de
>>httpd.conf?
>>
>>    <Directory C:\Program Files\Apache Group\Apache2\htdocs\project\>
>>        AddHandler mod_python .py
>>        PythonHandler mptest
>>        PythonDebug On
>>    </Directory>
>>
>>Because al the tutorials write this. But where?
>>    
>>
>
>try put it at the end of your http.conf file.
>
> >
> > If I try to put the code some where,
> > apache give the following message by testing the configure:
> > Multiple <Directory> arguments not (yet) supported
> > But what i have to change or replace.
>
>  
>
>just an idea, try:
>
><Directory "C:\Program Files\Apache Group\Apache2\htdocs\project">
>...
></Directory>
>
>because it sounds like apache parser gets confused
>with all those slashes.
>
>  
>
I could be wrong, but i think i read something about apache expecting 
you to use forward slashes instead of backslashes when i was using 
windows...
I seem to recall it being in the readme. ...?

>>I test with the next file:
>>
>>C:\Program Files\Apache Group\Apache2\htdocs\project\
>>mptest.py
>>
>>from mod_python import apache
>>
>>def handler(req):
>>   req.content_type = 'text/plain'
>>   req.send_http_header()
>>   req.write('mptest.py\n')
>>   return apache.OK
>>
>>Is this code enough for testing?
>>
>>    
>>
>
>i believe so.
>
>also check this:
>"Getting mod_python Working"
><http://www.dscpl.com.au/articles/modpython-001.html>
>
>  
>
HTH,
Peter




More information about the Python-list mailing list