[mod_python] configuring mod_python in Debian 2.2

Gregory Trubetskoy grisha at modpython.org
Thu Aug 17 13:48:49 EST 2000


Make sure you have some <Directory> tags, i.e:

<Directory /var/www/test>
	AddHandler python-program .py
	PythonHandler test
	PythonDebug On
</Directory>


On Thu, 17 Aug 2000, Raynald de Lahondes wrote:

> I am interested in mod_python but have difficulties in configuring the
> program. I am using Debian 2.2 binaries, id est:
> 
> apache 1.3.9
> python 1.5.2
> 
> I successfully compiled the lib and installed them in
> /usr/lib/python1.5/site-packages/mod_python
> 
> the "compileall.py" was ok.
> 
> I compiled mod_python as suggested with apxs tool
> 
> apxs -I /usr/include/python1.5 -c mod_python.c \
> /usr/lib/python1.5/config/libpython1.5.a -lpthread
> 
> and copied the resulting mod_python.so in /usr/lib/apache/1.3/
> 
> I modified the httpd.conf as suggested (first module, cf FAQ):
> LoadModule python_module /usr/lib/apache/1.3/mod_python.so
> 
> (apache started OK)
> I modified srm.conf (resource file for apache in Debian)
> 
> AddHandler python-program .py
> PythonHandler test
> PythonDebug On
> 
> and restarted apache again.
> 
> Then I create /var/www/test
> 
> and put the example test.py in /var/www/test/test.py
> 
> access to http://localfile/test/anything.py
> 
> generate an error: (in apache/error.log)
> 
> [Thu Aug 17 17:29:03 2000] [error] PythonHandler test: Traceback\
> (innermost last):
> [Thu Aug 17 17:29:03 2000] [error] PythonHandler test:   File\
> "/usr/lib/python1.5/mod_python/apache.py", line 113, in Dispatch
> [Thu Aug 17 17:29:03 2000] [error] PythonHandler test:   File\
> "/usr/lib/python1.5/mod_python/apache.py", line 246, in import_module
> [Thu Aug 17 17:29:03 2000] [error] PythonHandler test: ImportError: No\
> module named test
> 
> I tried to check directly with python libs but I can't:
> 
> >>> from mod_python import apache
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python1.5/mod_python/apache.py", line 18, in ?
> ImportError: No module named _apache
> >>> 
> 
> 
> I have done nearly all I could do with the documentation I have, I need some
> help please !
> 
> -- 
> Raynald de Lahondes
> Unite des Virus Oncogenes - Departement de Biotechnologie
> Institut Pasteur - 25, rue du Docteur Roux
> 75724 Paris Cedex 15 - FRANCE
> tel: 01.45.68.84.54 - fax: 01.40.61.30.33 - cellular: 06.15.65.85.08
> email: lahondes at pasteur.fr 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 




More information about the Mod_python mailing list