Installing mod_python on Freebsd 8.2
Thursday, September 22, 2011 at 1:40PM The other day I was setting up a fresh freebsd jail to act as host for a django based web site. I restarted apache and was given this error:
Syntax error on line 46 of /usr/local/etc/apache22/extra/httpd-vhosts.conf: Invalid command 'PythonHandler', perhaps misspelled or defined by a module not included in the ser ver configuration
Luckily I knew my mistake, I'd forgotten to install mod_python. I went to install it from ports and it failed to build...
demo# cd /usr/ports/www/mod_python demo# make ===> ap22-mod_python-2.7.11 : Error from bsd.apache.mk. apache22 is installed (or APACHE_PORT is defined) and port requires apache13 at most.
Slightly stumped, I searched around for a solution but couldn't find one. I eventually worked out that you need the mod_python3 package with apache22...
demo# whereis mod_python3 mod_python3: /usr/ports/www/mod_python3 demo# cd /usr/ports/www/mod_python3 demo# make
Hopefully this will help someone and remind me in future.
Finally if you're wondering why we're still using mod_python don't worry we're planning on switching to mod_wsgi within the next couple of months.
django,
freebsd,
mod_python,
mod_wsgi in
Django,
system administration,
web development 


