new nginx templates and wo man

This commit is contained in:
VirtuBox
2019-03-06 15:32:07 +01:00
parent d3d13e21a6
commit 050201ae77
13 changed files with 54 additions and 90 deletions

View File

@@ -254,13 +254,22 @@ class WOStackController(CementBaseController):
wo_nginx.close()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/conf.d/map-wp-fastcgi-cache.conf')
wo_nginx = open('/etc/nginx/conf.d/map-wp-fastcgi-cache.conf',
'file /etc/nginx/conf.d/map-wp.conf')
wo_nginx = open('/etc/nginx/conf.d/map-wp.conf',
encoding='utf-8', mode='w')
self.app.render((data), 'fastcgi-cache.mustache',
self.app.render((data), 'map-wp.mustache',
out=wo_nginx)
wo_nginx.close()
if not (os.path.isfile('/etc/nginx/conf.d/webp.conf')):
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/conf.d/webp.conf')
wo_nginx = open('/etc/nginx/conf.d/webp.conf',
encoding='utf-8', mode='w')
self.app.render((data), 'webp.mustache',
out=wo_nginx)
wo_nginx.close()
# Setup Nginx common directory
if not os.path.exists('/etc/nginx/common'):
Log.debug(self, 'Creating directory'
@@ -317,8 +326,8 @@ class WOStackController(CementBaseController):
wo_nginx.close()
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/common/wpsubdir-php72.conf')
wo_nginx = open('/etc/nginx/common/wpsubdir-php72.conf',
'file /etc/nginx/common/wpsubdir.conf')
wo_nginx = open('/etc/nginx/common/wpsubdir.conf',
encoding='utf-8', mode='w')
self.app.render((data), 'wpsubdir.mustache',
out=wo_nginx)