mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
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:
@@ -13,12 +13,13 @@ https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from awx import MODE
|
from awx import MODE
|
||||||
|
from distutils.sysconfig import get_python_lib
|
||||||
|
|
||||||
# Update the default settings environment variable based on current mode.
|
# Update the default settings environment variable based on current mode.
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'awx.settings.%s' % MODE)
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'awx.settings.%s' % MODE)
|
||||||
|
|
||||||
# Add local site-packages directory to path.
|
# 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')
|
'site-packages')
|
||||||
sys.path.insert(0, local_site_packages)
|
sys.path.insert(0, local_site_packages)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
NameVirtualHost *:80
|
NameVirtualHost *:80
|
||||||
|
WSGISocketPrefix /var/run/wsgi
|
||||||
|
|
||||||
<VirtualHost _default_:80>
|
<VirtualHost _default_:80>
|
||||||
ServerName localhost
|
ServerName localhost
|
||||||
|
|||||||
Reference in New Issue
Block a user