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.
This commit is contained in:
James Cammarata 2013-06-24 02:32:52 -04:00
parent 80afb2e08d
commit 956b076e5b
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -1,4 +1,5 @@
NameVirtualHost *:80
WSGISocketPrefix /var/run/wsgi
<VirtualHost _default_:80>
ServerName localhost