|
|
@ -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", |
|
|
|