PDA

View Full Version : Installing Django under mod_python


Phoop
12th June 2008, 23:01
I want to install mod_python under our ISPConfig. Surely this is not a problem, but I have a question regarding the configuring.

As ISPConfig does not support mod_python out of the box, I have to edit the vhosts file myself to add the nessecary lines. This is not a problem at all.

My question is: When I add those lines, and after a week or two want to edit that VHost under ISPConfig, will those lines be deleted or preserved?

till
13th June 2008, 12:33
Do not edit the vhost, add the lines in the apache directives field of the website instead.

Phoop
13th June 2008, 13:04
Totally forget about that part.

Thanks!

dayjahone
17th June 2008, 20:42
How do you do that? I'm interested in installing django as well. Thanks.

Phoop
18th June 2008, 12:20
Yes, I managed to install Django. Since Im running the latest Ubuntu LTS I just installed mod_python for Apache2 and exported the SVN Trunk to my site-packages.

After that I uploaded my django project to the web folder.

Last step, adjust and paste this into the Apache Directives in the ISPConfig configuration of the site:

<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE intranet.settings
PythonDebug On
PythonPath "['/var/www/web18/web'] + sys.path"
</Location>

falko
20th June 2008, 14:20
apt-get usually is for Debian-based distributions. You should try yast instead.