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