my example installation with subdomain to help others:
apache vitualhost
<VirtualHost *:80>
ServerName http://projects.example.com
DocumentRoot /home/foo/treeio
<Directory /home/foo/treeio>
Order allow,deny
Allow from all
</Directory>
WSGIDaemonProcess treeio.djangoserver processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup treeio.djangoserver
WSGIScriptAlias / /home/foo/treeio/wsgi
</VirtualHost>
wsgi file
import os
import sys
sys.path = ['/home/foo/treeio/.ve/lib/python2.6/site-packages/'] + sys.path
sys.path.append('/home/foo/')
sys.path.append('/home/foo/treeio')
os.environ['DJANGO_SETTINGS_MODULE'] = 'treeio.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
media paths in settings.py
MEDIA_ROOT = '/home/foo/treeio/static/media/'
MEDIA_URL = 'htpp://projects.example.com/static/media/'
Install python-imaging too.
In sys.path, i had to put the path for the virtual enviroment, to load that libs first, and later the system ones, because i got errors not finding pandora and some other stuff.
Rember to add write permissions to folder "foo", and subfolders for the user of the apache process.
cheers
asked
Feb 14 '12 at 05:35
zigggs
46●1●2●4
Thanks for this zigggs, this will be very useful for anyone wanting to use Apache. I'm adding a link to this post on the GitHub README page. Thumbs up!