[mod_python] cannot get mod-python to work !

Graham Dumpleton grahamd at dscpl.com.au
Mon May 2 06:55:49 EDT 2005


The problem probably is that you have no directive to say that a URL of 
/contrado
maps to the physical directory of /contrado. If you don't have one, it 
will look
for the directory under the document root of /var/www and thus why it 
is expecting
to find /var/www/contrado.

In addition to the <Directory> directive, specify:

   Alias /contrado /contrado

Graham

On 02/05/2005, at 8:45 PM, Graeme Matthew wrote:

> Hi Graham
>
> Im using
>
> http://10.1.1.3/contrado/fc.py
>
> and
>
> http://10.1.1.3/fc.py
>
> It looks like apache keeps on looking in /var/www
>
> I just dont get it used to be so simple but im sure it is something 
> ive done :-)
>
>
> Graham Dumpleton wrote:
>
>> What is the URL you are using for the request?
>>
>> On 02/05/2005, at 8:25 PM, Graeme Matthew wrote:
>>
>>> Hi all, I used mod-python with apache 1.3 about a year ago and it 
>>> took minutes to setup. I am now trying to set it up for Apache 2.0, 
>>> and what a time consuming task this has become. It is taking a lot 
>>> to get used to Apache2's layout instead of a simple HTTP.conf file 
>>> so who knows where other directives are.
>>>
>>> In summary I have done the following:
>>>
>>> I have created a folder called /contrado and created a fc.py script 
>>> which contains:
>>>
>>> from mod_python import apache
>>>
>>> def handler(req):
>>>    req..content_type = "text/html"
>>>    req.send_http_header()
>>>    req.write("Welcome to modpython!")
>>>    return apache.OK
>>>
>>> I have placed the following into my http.conf file
>>>
>>> <Directory /contrado>
>>> AddHandler mod_python .py
>>> PythonHandler fc
>>> PythonDebug On
>>> </Directory>
>>>
>>> The error log keeps reporting
>>>
>>> [Sun May 01 22:12:24 2005] [notice] mod_python: Creating 32 session 
>>> mutexes based on 6 max processes and 25 max threads.
>>> [Sun May 01 22:12:24 2005] [notice] Apache/2.0.53 (Debian GNU/Linux) 
>>> mod_python/3.1.3 Python/2.3.5 configured -- resuming normal 
>>> operations
>>> [Sun May 01 22:12:30 2005] [error] [client 10.1.1.2] File does not 
>>> exist: /var/www/contrado
>>> [Sun May 01 22:12:35 2005] [error] [client 10.1.1.2] File does not 
>>> exist: /var/www/contrado
>>> [Sun May 01 22:12:39 2005] [error] [client 10.1.1.2] File does not 
>>> exist: /var/www/contrado
>>>
>>> Im lost here any help would be much appreciated ...
>>
>>
>>
>
>
> -- 
> Graeme Matthew
> Director
> Contrado Solutions PTY LTD
> email: graeme.matthew at contrado.com.au
> mobile: 0400-872-879



More information about the Mod_python mailing list