newbie help for mod_python

J

Jochen Kaechelin

I run debian sid and apache2 with libapache2-mod-python2.3
and I added these lines

<Directory /var/www>
AddHandler mod_python .py
PythonDebug On
</Directory>

in a virtualhost container.

and I have the following python-file:

from mod_python import apache
def requesthandler(req):
req.content_type = "text/plain"
req.write("HELLO")
return apache.OK

But the file is not executed - instead a download-dialog
is opened.

Any suggestions?

Thanx.
 
B

Brian Beck

Jochen said:
I run debian sid and apache2 with libapache2-mod-python2.3
and I added these lines

<Directory /var/www>
AddHandler mod_python .py
PythonDebug On
</Directory>

in a virtualhost container.

Were those the only lines you added? You also should have actually
loaded the module somewhere by adding something resembling:

LoadModule python_module modules/mod_python.so
 
J

Jochen Kaechelin

Am Mittwoch, 23. Februar 2005 00:29 schrieb Brian Beck:
Were those the only lines you added? You also should have
actually loaded the module somewhere by adding something
resembling:

LoadModule python_module modules/mod_python.so

Thats done by debian during installation:

Module Name: mod_python.c
Content handlers: yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top