diff --git a/README.md b/README.md index 29d266d..f1b3767 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,12 @@ webvirtcloud RUNNING pid 24185, uptime 2:59:14 ``` +#### Apache mod_wsgi configuration +``` +WSGIDaemonProcess webvirtcloud threads=2 maximum-requests=1000 display-name=webvirtcloud +WSGIScriptAlias / /srv/webvirtcloud/webvirtcloud/wsgi.py +``` + #### Install final required packages for libvirtd and others on Host Server ```bash wget -O - https://clck.ru/9V9fH | sudo sh diff --git a/webvirtcloud/wsgi.py b/webvirtcloud/wsgi.py index 35ceb9b..a9bf44c 100644 --- a/webvirtcloud/wsgi.py +++ b/webvirtcloud/wsgi.py @@ -7,7 +7,10 @@ For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ -import os +execfile('/srv/webvirtcloud/venv/bin/activate_this.py', dict(__file__='/srv/webvirtcloud/venv/bin/activate_this.py')) + +import os, sys +sys.path.append('/srv/webvirtcloud') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings") from django.core.wsgi import get_wsgi_application