|
@ -141,7 +141,8 @@ class EEStackController(CementBaseController): |
|
|
if set(EEVariables.ee_postfix).issubset(set(apt_packages)): |
|
|
if set(EEVariables.ee_postfix).issubset(set(apt_packages)): |
|
|
pass |
|
|
pass |
|
|
if set(EEVariables.ee_nginx).issubset(set(apt_packages)): |
|
|
if set(EEVariables.ee_nginx).issubset(set(apt_packages)): |
|
|
# Nginx core configuration change using configparser |
|
|
if ((not os.path.isfile('/etc/nginx/conf.d/ee-nginx.conf')) and |
|
|
|
|
|
os.path.isfile('/etc/nginx/nginx.conf')): |
|
|
nc = NginxConfig() |
|
|
nc = NginxConfig() |
|
|
self.app.log.debug('Loading file /etc/nginx/nginx.conf ') |
|
|
self.app.log.debug('Loading file /etc/nginx/nginx.conf ') |
|
|
nc.loadf('/etc/nginx/nginx.conf') |
|
|
nc.loadf('/etc/nginx/nginx.conf') |
|
@ -158,28 +159,29 @@ class EEStackController(CementBaseController): |
|
|
|
|
|
|
|
|
# Custom Nginx configuration by EasyEngine |
|
|
# Custom Nginx configuration by EasyEngine |
|
|
data = dict(version='EasyEngine 3.0.1') |
|
|
data = dict(version='EasyEngine 3.0.1') |
|
|
self.app.log.debug('writting the nginx configration to file' |
|
|
self.app.log.debug('writting the nginx configration to ' |
|
|
'/etc/nginx/conf.d/ee-nginx.conf ') |
|
|
'file /etc/nginx/conf.d/ee-nginx.conf ') |
|
|
ee_nginx = open('/etc/nginx/conf.d/ee-nginx.conf', 'w') |
|
|
ee_nginx = open('/etc/nginx/conf.d/ee-nginx.conf', 'w') |
|
|
self.app.render((data), 'nginx-core.mustache', out=ee_nginx) |
|
|
self.app.render((data), 'nginx-core.mustache', |
|
|
|
|
|
out=ee_nginx) |
|
|
ee_nginx.close() |
|
|
ee_nginx.close() |
|
|
|
|
|
|
|
|
data = dict() |
|
|
data = dict() |
|
|
self.app.log.debug('writting the nginx configration to file' |
|
|
self.app.log.debug('writting the nginx configration to' |
|
|
'/etc/nginx/conf.d/blockips.conf ') |
|
|
'file /etc/nginx/conf.d/blockips.conf') |
|
|
ee_nginx = open('/etc/nginx/conf.d/blockips.conf', 'w') |
|
|
ee_nginx = open('/etc/nginx/conf.d/blockips.conf', 'w') |
|
|
self.app.render((data), 'blockips.mustache', out=ee_nginx) |
|
|
self.app.render((data), 'blockips.mustache', out=ee_nginx) |
|
|
ee_nginx.close() |
|
|
ee_nginx.close() |
|
|
|
|
|
|
|
|
self.app.log.debug('writting the nginx configration to file' |
|
|
self.app.log.debug('writting the nginx configration to' |
|
|
'/etc/nginx/conf.d/fastcgi.conf ') |
|
|
' file /etc/nginx/conf.d/fastcgi.conf') |
|
|
ee_nginx = open('/etc/nginx/conf.d/fastcgi.conf', 'w') |
|
|
ee_nginx = open('/etc/nginx/conf.d/fastcgi.conf', 'w') |
|
|
self.app.render((data), 'fastcgi.mustache', out=ee_nginx) |
|
|
self.app.render((data), 'fastcgi.mustache', out=ee_nginx) |
|
|
ee_nginx.close() |
|
|
ee_nginx.close() |
|
|
|
|
|
|
|
|
data = dict(php="9000", debug="9001") |
|
|
data = dict(php="9000", debug="9001") |
|
|
self.app.log.debug('writting the nginx configration to file' |
|
|
self.app.log.debug('writting the nginx configration to' |
|
|
'/etc/nginx/conf.d/upstream.conf ') |
|
|
'file /etc/nginx/conf.d/upstream.conf ') |
|
|
ee_nginx = open('/etc/nginx/conf.d/upstream.conf', 'w') |
|
|
ee_nginx = open('/etc/nginx/conf.d/upstream.conf', 'w') |
|
|
self.app.render((data), 'upstream.mustache', out=ee_nginx) |
|
|
self.app.render((data), 'upstream.mustache', out=ee_nginx) |
|
|
ee_nginx.close() |
|
|
ee_nginx.close() |
|
|