updating letsencrypt=renew

This commit is contained in:
VirtuBox
2019-03-18 14:19:30 +01:00
parent b02ff1f98e
commit 0d3760f842
2 changed files with 28 additions and 7 deletions

View File

@@ -28,10 +28,10 @@
- Easy Migration from EasyEngine v3 (migration script development in progress)
- Automated WordPress, Nginx, PHP, MySQL & Redis installation
- Up-to-date server stack with Nginx 1.14.2, PHP 7.2 & 7.3, MariaDB 10.3 & Redis 5.0
- Nginx 1.14.2 with Brotli support, PHP 7.2 & 7.3, MariaDB 10.3 & Redis 5.0
- Hardened WordPress security with strict Nginx location directives
- Optimized Nginx configurations with multiple cache backends support
- Let's Encrypt SSL certificates
- Let's Encrypt SSL certificates handled by Acme.sh
- Secured SSL/TLS encryption with strong ciphers_suite and modern TLS protocols
## Requirements
@@ -41,7 +41,7 @@
- Ubuntu 16.04 LTS (Xenial)
- Ubuntu 18.04 LTS (Bionic)
- Debian 8 (Jessie)
- Debian 9 (Stretch) -> **Not fully supported yet**
- Debian 9 (Stretch)
### Ports requirements
@@ -137,7 +137,9 @@ wo update
## Credits
- [EasyEngine](https://github.com/easyengine/easyengine)
- Main source : [EasyEngine](https://github.com/easyengine/easyengine)
- Acme client : [Acme.sh](https://github.com/Neilpang/acme.sh)
## License

View File

@@ -1430,11 +1430,11 @@ def httpsRedirect(self, wo_domain_name, redirect=True):
" http://{0}".format(wo_domain_name))
def archivedCertificateHandle(self, domain, wo_wp_email):
def archivedCertificateHandle(self, domain):
Log.warn(self, "You already have an existing certificate "
"for the domain requested.\n"
"(ref: {0}/"
"{0}_ecc/{0}.conf)".format(WOVariables.wo_ssl_archive, domain) +
"{1}_ecc/{1}.conf)".format(WOVariables.wo_ssl_archive, domain) +
"\nPlease select an option from below?"
"\n\t1: Reinstall existing certificate"
"\n\t2: Keep the existing certificate for now"
@@ -1445,7 +1445,7 @@ def archivedCertificateHandle(self, domain, wo_wp_email):
if not os.path.isfile("{0}/{1}/fullchain.pem"
.format(WOVariables.wo_ssl_live, domain)):
Log.error(
self, "{0}/{1}/cert.pem file is missing."
self, "{0}/{1}/fullchain.pem file is missing."
.format(WOVariables.wo_ssl_live, domain))
if check_prompt == "1":
@@ -1464,6 +1464,25 @@ def archivedCertificateHandle(self, domain, wo_wp_email):
"--reloadcmd "
"\"service nginx restart\" "
.format(WOVariables.wo_ssl_live, domain))
if ssl:
if not os.path.isfile("/var/www/{0}/conf/nginx/ssl.conf"
.format(domain)):
Log.info(
self, "Adding /var/www/{0}/conf/nginx/ssl.conf"
.format(wo_domain_name))
Log.info(self, "Install . Backing it up ..")
sslconf = open("/var/www/{0}/conf/nginx/ssl.conf"
.format(wo_domain_name),
encoding='utf-8', mode='w')
sslconf.write("listen 443 ssl http2;\n"
"listen [::]:443 ssl http2;\n"
"ssl on;\n"
"ssl_certificate {0}/{1}/fullchain.pem;\n"
"ssl_certificate_key {0}/{1}/key.pem;\n"
.format(WOVariables.wo_ssl_live, wo_domain_name))
sslconf.close()
elif (check_prompt == "2"):
Log.info(self, "Using Existing Certificate files")