Problems with setting up mod_python and Apache

Dave Benjamin dave at 3dex.com
Wed Sep 10 20:01:19 EDT 2003


Quoting John Dean:
>
> Here are the lines in my httpd.conf
> LoadModule python_module      /usr/lib/apache/mod_python.so
>
> AddModule mod_python.c
>
> <Directory "srv/www/htdocs">
> .....
> .....
>
> Addhandler python-program .py
> PythonHandler test

Looks right to me. Have you verified that:
  a) you are editing the right httpd.conf  (hey, it happens...)
  b) you are affecting the directory you think you are  (do other apache
directives work properly?)

Once things are working, you may also want to read up on and consider adding
this:
PythonInterpPerDirectory on
(hint: otherwise, if you have a test.py in another directory, you will get
bizarre results)

Good luck,
Dave

PS - Please keep replies to the list for the benefit of others. =)






More information about the Python-list mailing list