www/mod_python support in apache22?

Chris Haulmark chris at sigd.net
Tue Dec 11 08:06:31 PST 2007


Hi Paul:
> 
> On Dec 11, 2007 12:36 AM, Chris Haulmark <chris at sigd.net> wrote:
> > Hello,
> > I am trying to get devel/subversion and www/trac working on my
> FreeBSD
> > 6.x system.
> > I ran into problems related to viewing the trac's website.  I am
> using
> > lang/mod_python as part of the
> >
> > requirement along with www/apache22.
> 
> > After I googled, I found off the FreeBSD mailing list that mod_python
> is
> > not supported for apache22
> >
> > and that it is shown on the mod_python's home page.
> > I do not see it anywhere.
> > This post was posted in 2005 and here is the link:
> > http://lists.freebsd.org/pipermail/freebsd-ports/2006-
> March/030408.html
> > The description is not clear to me on the mod_python's website.  The
> > description is:
> > "Apache 2.0.54 or later. Apache versions 2.0.47 to 2.0.53 may work
> but
> > have not been tested with
> > this release. (For Apache 1.3.x, use mod_python version 2.7.x)."
> > I am asking that if it has changed and that mod_python is supported
> to
> > be used with apache22?
> >
> > Chris Haulmark
> 
> Chris,
> 
> 6.2-RELEASE
> apache-2.2.6 from ports
> mod_python-3.3.1   /usr/ports/www/mod_python3
> and it works just fine.
> 
> Tested by 900 users accessing few small webapps (python django web
> framework)

Thank you guys for confirming that the mod_python3 should be working fine
with apache22.

I had figured that the ordering of the LoadModule had to be in a
certain order.

This is the ordering:

LoadModule dav_module         libexec/apache22/mod_dav.so
LoadModule dav_svn_module     libexec/apache22/mod_dav_svn.so
LoadModule authz_svn_module   libexec/apache22/mod_authz_svn.so
LoadModule dav_fs_module libexec/apache22/mod_dav_fs.so
LoadModule python_module      libexec/apache22/mod_python.so

Now I am only having problems testing if a python file is being parsed.

I used this to create a test .py file:

from mod_python import apache

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

and it is not being parsed.

I have this line roughly on line 370 of the httpd.conf:

AddHandler mod_python .py

When I view this test .py file via web browser, I can see the source
code instead of the expected "Hello World!".

Did I forget something else?

By the way, I was following the recent OnLAMP article "Subversion for
BSD With All the Bells and Whistles"

Chris


> 
> Cheers,
> Paul


More information about the freebsd-ports mailing list