update 22222 ssl configuration
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<p align="center"><img src="https://docs.wordops.net/images/logo.png" width="400" alt="Wordops" /><a href="https://wordops.net">
|
<p align="center"><img src="https://raw.githubusercontent.com/WordOps/WordOps/updating-configuration/logo.png" width="400" alt="Wordops" /><a href="https://wordops.net">
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
</p>
|
</p>
|
||||||
@@ -140,8 +140,8 @@ wo update
|
|||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
If you feel there is a bug directly related to WordOps, feel free to open an issue.
|
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/suggestions about WordOps or if you need support, please use the [WordOps Community Forum](https://community.wordops.net/).
|
For any other questions about WordOps or if you need support, please use the [Community Forum](https://community.wordops.net/).
|
||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -442,6 +442,14 @@ class WOStackController(CementBaseController):
|
|||||||
os.makedirs('{0}22222/cert'
|
os.makedirs('{0}22222/cert'
|
||||||
.format(WOVariables.wo_webroot))
|
.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/'
|
WOFileUtils.create_symlink(self, ['/var/log/nginx/'
|
||||||
'22222.access.log',
|
'22222.access.log',
|
||||||
'{0}22222/'
|
'{0}22222/'
|
||||||
@@ -491,6 +499,15 @@ class WOStackController(CementBaseController):
|
|||||||
self, "Failed to generate HTTPS "
|
self, "Failed to generate HTTPS "
|
||||||
"certificate for 22222")
|
"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
|
# Nginx Configation into GIT
|
||||||
WOGit.add(self,
|
WOGit.add(self,
|
||||||
["/etc/nginx"], msg="Adding Nginx into Git")
|
["/etc/nginx"], msg="Adding Nginx into Git")
|
||||||
|
|||||||
@@ -7,9 +7,6 @@ server {
|
|||||||
access_log /var/log/nginx/22222.access.log rt_cache;
|
access_log /var/log/nginx/22222.access.log rt_cache;
|
||||||
error_log /var/log/nginx/22222.error.log;
|
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
|
# Force HTTP to HTTPS
|
||||||
error_page 497 =200 https://$host:22222$request_uri;
|
error_page 497 =200 https://$host:22222$request_uri;
|
||||||
|
|
||||||
@@ -65,9 +62,8 @@ server {
|
|||||||
proxy_store off;
|
proxy_store off;
|
||||||
proxy_pass http://netdata/$ndpath$is_args$args;
|
proxy_pass http://netdata/$ndpath$is_args$args;
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_types *;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include {{webroot}}22222/conf/nginx/*.conf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user