diff --git a/README.md b/README.md
index 4afeb33..f30ff20 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-
+
@@ -140,8 +140,8 @@ wo update
## Support
-If you feel there is a bug directly related to WordOps, feel free to open an issue.
-For any other questions/suggestions about WordOps or if you need support, please use the [WordOps Community Forum](https://community.wordops.net/).
+If you feel there is a bug directly related to WordOps, or if you want to suggest new features for WordOps, feel free to open an issue.
+For any other questions about WordOps or if you need support, please use the [Community Forum](https://community.wordops.net/).
# Contributing
diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py
index 1f5bf42..2f707ce 100644
--- a/wo/cli/plugins/stack.py
+++ b/wo/cli/plugins/stack.py
@@ -442,6 +442,14 @@ class WOStackController(CementBaseController):
os.makedirs('{0}22222/cert'
.format(WOVariables.wo_webroot))
+ if not os.path.exists('{0}22222/conf/nginx'
+ .format(WOVariables.wo_webroot)):
+ Log.debug(self, "Creating directory "
+ "{0}22222/conf/nginx"
+ .format(WOVariables.wo_webroot))
+ os.makedirs('{0}22222/conf/nginx'
+ .format(WOVariables.wo_webroot))
+
WOFileUtils.create_symlink(self, ['/var/log/nginx/'
'22222.access.log',
'{0}22222/'
@@ -491,6 +499,15 @@ class WOStackController(CementBaseController):
self, "Failed to generate HTTPS "
"certificate for 22222")
+ if not os.path.isfile('{0}22222/conf/nginx/ssl.conf'
+ .format(WOVariables.wo_webroot)):
+ with open("/etc/nginx/conf.d/"
+ "upstream.conf", "a") as php_file:
+ php_file.write("ssl_certificate "
+ "/var/www/22222/cert/22222.crt;\n"
+ "ssl_certificate_key "
+ "/var/www/22222/cert/22222.key;\n")
+
# Nginx Configation into GIT
WOGit.add(self,
["/etc/nginx"], msg="Adding Nginx into Git")
diff --git a/wo/cli/templates/22222.mustache b/wo/cli/templates/22222.mustache
index 82bfcb6..3106ee7 100644
--- a/wo/cli/templates/22222.mustache
+++ b/wo/cli/templates/22222.mustache
@@ -7,9 +7,6 @@ server {
access_log /var/log/nginx/22222.access.log rt_cache;
error_log /var/log/nginx/22222.error.log;
- ssl_certificate {{webroot}}22222/cert/22222.crt;
- ssl_certificate_key {{webroot}}22222/cert/22222.key;
-
# Force HTTP to HTTPS
error_page 497 =200 https://$host:22222$request_uri;
@@ -65,9 +62,8 @@ server {
proxy_store off;
proxy_pass http://netdata/$ndpath$is_args$args;
- gzip on;
- gzip_proxied any;
- gzip_types *;
}
+ include {{webroot}}22222/conf/nginx/*.conf;
+
}