[mod_python] testing mod_python on Ubuntu

Graham Dumpleton graham.dumpleton at gmail.com
Tue Apr 8 22:13:07 EDT 2008


For starters, read:

  http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking

and follow its debugging tips.

Graham

2008/4/9 Toby Donaldson <tjd at sfu.ca>:
> Hi,
>
>  I've gotten stuck testing mod_python on Ubuntu (Gutsy) on what I
>  assume some simple oversight on my part. I'm using the standard
>  packages from apt-get:
>
>  mod_python 3.3.1
>  python 2.5.1
>  apache 2.2.4
>
>  Following http://modpython.org/live/current/doc-html/inst-testing.html,
>  I've added this to http.conf:
>
>     <Directory /mptest>
>         AddHandler mod_python .py
>         PythonHandler mptest
>         PythonDebug On
>     </Directory>
>
>  In the mptest directory, I have mptest.py with these contents:
>
>  from mod_python import apache
>
>  def handler(req):
>       req.content_type = 'text/plain'
>       req.write('mptest.py\n')
>       return apache.OK
>
>  Yet every time I access mptest.py through the web, Firefox asks if I
>  want to view or save the file mptest.py. I've tried a number of
>  variations of this (re-starting Apache after each change), but it
>  always gives the same results.
>
>  I did get mod_python.testhanlder working.
>
>  Any advice on how to proceed?
>
>  Toby
>  --
>  Dr. Toby Donaldson
>  School of Computing Science
>  Simon Fraser University (Surrey)
>  _______________________________________________
>  Mod_python mailing list
>  Mod_python at modpython.org
>  http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list