From 09e6dbc30efe3b4da2bae86418cd7449a2118156 Mon Sep 17 00:00:00 2001 From: prabuddha Date: Sun, 3 Jan 2016 14:18:42 +0530 Subject: [PATCH] change http2/spdy parameter in ssl.conf --- ee/cli/plugins/stack.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index de4456c6..86d55737 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -249,6 +249,20 @@ class EEStackController(CementBaseController): Log.debug(self, 'Setting http2/spdy in 22222') EEShellExec.cmd_exec(self, "sed -i 's/http2\|spdy/{0}/g' /etc/nginx/sites-available/22222".format(http2)) + sites = getAllsites(self) + if sites: + for site in sites: + site_name = site.sitename + siteinfo = getSiteInfo(self, site_name) + ssl = ("enabled" if siteinfo.is_ssl else "disabled") + if (ssl == "enabled"): + if os.path.isfile('/var/www/{0}/conf/nginx/ssl.conf'.format(site_name)): + http2 =("http2" if EEAptGet.is_installed(self,'nginx-mainline') else "spdy") + if not EEShellExec.cmd_exec(self, "grep -q \'{http2}\' /var/www/{site}/conf/nginx/ssl.conf".format(http2=http2,site=site_name)): + Log.debug(self, 'Setting http2/spdy in ssl.conf') + EEShellExec.cmd_exec(self, "sed -i 's/http2\|spdy/{0}/g' /var/www/{site}/conf/nginx/ssl.conf".format(http2=http2,site=site_name)) + + if not (os.path.isfile('/etc/nginx/common/wpfc.conf')): # Change EasyEngine Version in nginx.conf file EEFileUtils.searchreplace(self, "/etc/nginx/nginx.conf",