Browse Source

Fix nginx config error

master
Prabuddha Chakraborty 9 years ago
parent
commit
6a910ea552
  1. 16
      ee/cli/plugins/site_functions.py
  2. 12
      ee/cli/plugins/stack.py

16
ee/cli/plugins/site_functions.py

@ -857,6 +857,14 @@ def site_package_check(self, stype):
if os.path.isdir("/etc/nginx/common") and (not
os.path.isfile("/etc/nginx/common/php7.conf")):
data = dict()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/common/locations-php7.conf')
ee_nginx = open('/etc/nginx/common/locations-php7.conf',
encoding='utf-8', mode='w')
self.app.render((data), 'locations-php7.mustache',
out=ee_nginx)
ee_nginx.close()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/common/php7.conf')
ee_nginx = open('/etc/nginx/common/php7.conf',
@ -872,6 +880,14 @@ def site_package_check(self, stype):
self.app.render((data), 'w3tc-php7.mustache', out=ee_nginx)
ee_nginx.close()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/common/wpcommon-php7.conf')
ee_nginx = open('/etc/nginx/common/wpcommon-php7.conf',
encoding='utf-8', mode='w')
self.app.render((data), 'wpcommon-php7.mustache',
out=ee_nginx)
ee_nginx.close()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/common/wpfc-php7.conf')
ee_nginx = open('/etc/nginx/common/wpfc-php7.conf',

12
ee/cli/plugins/stack.py

@ -384,8 +384,8 @@ class EEStackController(CementBaseController):
os.path.isfile("/etc/nginx/common/php7.conf")):
#data = dict()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/common/locations.conf')
ee_nginx = open('/etc/nginx/common/locations.conf',
'file /etc/nginx/common/locations-php7.conf')
ee_nginx = open('/etc/nginx/common/locations-php7.conf',
encoding='utf-8', mode='w')
self.app.render((data), 'locations-php7.mustache',
out=ee_nginx)
@ -407,7 +407,7 @@ class EEStackController(CementBaseController):
ee_nginx.close()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/common/wpcommon.conf')
'file /etc/nginx/common/wpcommon-php7.conf')
ee_nginx = open('/etc/nginx/common/wpcommon-php7.conf',
encoding='utf-8', mode='w')
self.app.render((data), 'wpcommon-php7.mustache',
@ -644,8 +644,8 @@ class EEStackController(CementBaseController):
os.path.isfile("/etc/nginx/common/php7.conf")):
data = dict()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/common/locations.conf')
ee_nginx = open('/etc/nginx/common/locations.conf',
'file /etc/nginx/common/locations-php7.conf')
ee_nginx = open('/etc/nginx/common/locations-php7.conf',
encoding='utf-8', mode='w')
self.app.render((data), 'locations-php7.mustache',
out=ee_nginx)
@ -667,7 +667,7 @@ class EEStackController(CementBaseController):
ee_nginx.close()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/common/wpcommon.conf')
'file /etc/nginx/common/wpcommon-php7.conf')
ee_nginx = open('/etc/nginx/common/wpcommon-php7.conf',
encoding='utf-8', mode='w')
self.app.render((data), 'wpcommon-php7.mustache',

Loading…
Cancel
Save