You are not logged in.

#1 2006-02-08 23:32:58

Husio
Member
From: Europe
Registered: 2005-12-04
Posts: 359
Website

Apache configuration

Hi,
here's what I'm using :
apache 2.0.55-1
mod_python 3.1.4-1
python 2.4.2-1

Now, here's a cut of my /etc/httpd/conf/httpd.conf file :

...
LoadModule vhost_alias_module    lib/apache/mod_vhost_alias.so
LoadModule python_module    lib/apache/mod_python.so 
#LoadModule php5_module        lib/apache/libphp5.so



<Directory /home/httpd/html/www/python_scripts/>
        AddHandler python-program .py
        PythonHandler test
        PythonDebug On
        
         Order allow,deny
        Allow from all
</Directory>
...

Everything else in this file is set by default.
Next : the last lines of my /var/log/httpd/error_log

[Wed Feb 08 22:59:11 2006] [notice] SIGHUP received.  Attempting to restart
[Wed Feb 08 22:59:11 2006] [notice] Digest: generating secret for digest authentication ...
[Wed Feb 08 22:59:11 2006] [notice] Digest: done
[Wed Feb 08 22:59:11 2006] [notice] mod_python: Creating 32 session mutexes based on 150 max processes and 0 max threads.
[Wed Feb 08 22:59:11 2006] [notice] Apache/2.0.55 (Unix) DAV/2 mod_ssl/2.0.55 OpenSSL/0.9.7h mod_python/3.1.4 Python/2.4 configured -- resuming normal operations
[Wed Feb 08 22:59:12 2006] [error] make_obcallback: could not import mod_python.apache.n

That's my test.py file which I'm trying to run :

#!/usr/bin/env python
from mod_python import apache
def handler(req):
    req.write("Hello World!")
    return apache.OK

and the error is : 500 Internal Server Error

any ideas what could be wrong ?

Offline

Board footer

Powered by FluxBB