From e4e878d0414067f8971c407b90f3f62a64204412 Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Fri, 7 Oct 2016 14:41:34 -0400 Subject: [PATCH] copy nginx config and uwsgi_params --- config/awx-nginx.conf | 21 ++++++++++++--------- setup.py | 10 ++++++---- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/config/awx-nginx.conf b/config/awx-nginx.conf index facaeae181..b883bc56f5 100644 --- a/config/awx-nginx.conf +++ b/config/awx-nginx.conf @@ -59,15 +59,18 @@ http { } location / { - proxy_pass http://uwsgi; - proxy_http_version 1.1; - proxy_buffering off; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header Host $http_host; - proxy_redirect off; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; + uwsgi_pass uwsgi; + include /etc/nginx/uwsgi_params; + + #proxy_pass http://uwsgi; + #proxy_http_version 1.1; + #proxy_buffering off; + #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + #proxy_set_header X-Forwarded-Proto https; + #proxy_set_header Host $http_host; + #proxy_redirect off; + #proxy_set_header Upgrade $http_upgrade; + #proxy_set_header Connection $connection_upgrade; } } } diff --git a/setup.py b/setup.py index e6e25d4eec..bddc6f0645 100755 --- a/setup.py +++ b/setup.py @@ -25,14 +25,16 @@ docdir = "/usr/share/doc/ansible-tower" if os.path.exists("/etc/debian_version"): sysinit = "/etc/init.d" - webconfig = "/etc/apache2/conf.d" + webconfig = "/etc/nginx" + siteconfig = "/etc/nginx/sites-enabled" # sosreport-3.1 (and newer) look in '/usr/share/sosreport/sos/plugins' # sosreport-3.0 looks in '/usr/lib/python2.7/dist-packages/sos/plugins' # debian/.links will create symlinks to support both versions sosconfig = "/usr/share/sosreport/sos/plugins" else: sysinit = "/etc/rc.d/init.d" - webconfig = "/etc/httpd/conf.d" + webconfig = "/etc/nginx" + siteconfig = "/etc/nginx/sites-enabled" # The .spec will create symlinks to support multiple versions of sosreport sosconfig = "/usr/share/sosreport/sos/plugins" @@ -114,8 +116,8 @@ setup( data_files = proc_data_files([ ("%s" % homedir, ["config/wsgi.py", "awx/static/favicon.ico"]), - ("%s" % webconfig, ["config/awx-httpd-80.conf", - "config/awx-httpd-443.conf"]), + ("%s" % siteconfig, ["config/awx-nginx.conf"]), + ("%s" % webconfig, ["config/uwsgi_params"]), ("%s" % sharedir, ["tools/scripts/request_tower_configuration.sh","tools/scripts/request_tower_configuration.ps1"]), ("%s" % docdir, ["docs/licenses/*",]), ("%s" % bindir, ["tools/scripts/ansible-tower-service",