proxadmin/start.wsgi

21 lines
626 B
Plaintext
Raw Normal View History

2017-03-08 13:53:09 -05:00
import sys
import os
import site
#import logging
#add the site-packages of the chosen virtualenv
site.addsitedir('/home/proxadmin/appserver/lib/python3.5/site-packages')
#activate virtualenv
2017-12-14 18:00:02 -05:00
#using libapache2-mod-wsgi:
2017-03-08 13:53:09 -05:00
#activate_this = '/home/proxadmin/appserver/bin/activate_this.py'
#execfile(activate_this, dict(__file__=activate_this))
2017-12-14 18:00:02 -05:00
#... or using libapache2-mod-wsgi-py3:
2017-03-08 13:53:09 -05:00
activate_this = '/home/proxadmin/appserver/bin/activate_this.py'
with open(activate_this) as file_:
exec(file_.read(), dict(__file__=activate_this))
2017-03-09 11:44:20 -05:00
sys.path.append('/home/proxadmin/appserver/proxadmin')
2017-03-08 13:53:09 -05:00
from app import app as application