You are not logged in.

#1 2006-01-28 21:59:50

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

How to configurate apache + mod_python ?

I've installed apache and mod_python module. Then in /etc/httpd/conf/httpd.conf (why not just /etc/apache/apache.conf? nevermind). As it is sain in instruction instruction , I've wrote

   LoadModule python_module libexec/mod_python.so

into this file, and restart apache. Here's the error log :

# apachectl -k restart
Syntax error on line 1087 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/libexec/mod_python.so into server: /usr/libexec/mod_python.so: cannot open shared object file: No such file or directory

Where is mod_python ? Can't find it by whereis.
Why in arch, most of aplications are is such a stupid paces witho differents names ?

Offline

#2 2006-01-29 00:12:17

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: How to configurate apache + mod_python ?

pacman -S mod_python
put
    LoadModule python_module /usr/lib/apache/mod_python.so

Dusty

Offline

#3 2006-01-29 10:09:11

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

Re: How to configurate apache + mod_python ?

ok, now apache works witch 1 error hmm

# apachectl -k restart
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

but there's another problem. I've add into httpd.conf :

<Directory /home/httpd/html/site/banner.py>
        AddHandler mod_python .py
        PythonHandler mptest
        PythonDebug On
    </Directory>

and there's a huge error when I go to this URL. When I change the httpd.conf file into :

<Directory /home/httpd/html/site/banner.py>
        AddHandler python_module .py
        PythonHandler mptest
        PythonDebug On
    </Directory>

there's no error, but the URL shows the file, like normal text.

from mod_python import apache

              def handler(req):
                         req.write("Hello World!")
                         return apache.OK

I've saved it as /home/httpd/html/site/banner.py and 'chmod +x' it. No idea what's wrong  :?

Offline

Board footer

Powered by FluxBB