From 956b076e5b0459178a998e3b7487f17337e4878e Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 24 Jun 2013 02:32:52 -0400 Subject: [PATCH] Updated wsgi.py to get the lib path from distutils.sysconfig * also re-added the WSGISocketPrefix line to the apache config, since that was broken on RHEL systems, however it is now changed to be in /var/run instead of just run (relative to the httpd root) which didn't work on Ubuntu systems. --- awx/wsgi.py | 3 ++- config/awx.conf | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/wsgi.py b/awx/wsgi.py index 8dc82d8910..5e2fc1bdb6 100644 --- a/awx/wsgi.py +++ b/awx/wsgi.py @@ -13,12 +13,13 @@ https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ import os import sys from awx import MODE +from distutils.sysconfig import get_python_lib # Update the default settings environment variable based on current mode. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'awx.settings.%s' % MODE) # Add local site-packages directory to path. -local_site_packages = os.path.join(os.path.dirname(__file__), 'lib', +local_site_packages = os.path.join(get_python_lib(), 'awx', 'lib', 'site-packages') sys.path.insert(0, local_site_packages) diff --git a/config/awx.conf b/config/awx.conf index f57573933b..14909d8fc4 100644 --- a/config/awx.conf +++ b/config/awx.conf @@ -1,4 +1,5 @@ NameVirtualHost *:80 +WSGISocketPrefix /var/run/wsgi ServerName localhost