I try to install my application created on Pylons on the Debian server that has already Apache2 + mod_wsgi + virtualenv + userdir.
What I did:
- creating prod.ini by copying development.ini.
- Change sqlalchemy.url
- set debug = false
- write a script in ~/public_html/wsgi-script as follow:
import os import site os.environ['PYTHON_EGG_CACHE'] = "/home/myhome/egg" site.addsitedir("/home/myhome/wsgiapp/basa2") site.addsitedir("/home/myhome/pyenv/PYLONS-1/lib/python2.5/site-packages") from paste.deploy import loadapp APP_CONFIG = "/home/myhome/wsgiapp/basa2/prod.ini" application = loadapp("config:" + APP_CONFIG) - I also modify this file: /home/vee/pydev/PYLONS-1/lib/python2.5/site-packages/Pylons-0.9.7rc3-py2.5.egg/pylons/wsgiapp.py by checking before the command:
del environ['pylons.pylons']
following this changeset. (I use Pylons 0.9.7rc3)
The procedures above are just conclusion. I did a lot of trial and error. I also restart Apache web server (I must not have to do). By the ways, it works now.



