add ipv6 support in letsencrypt
This commit is contained in:
@@ -10,8 +10,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
|
|
||||||
### v3.9.5 - [Unreleased]
|
### v3.9.5 - [Unreleased]
|
||||||
|
|
||||||
### Changed
|
#### Added
|
||||||
|
|
||||||
|
- IPv6 support with HTTPS
|
||||||
|
|
||||||
|
#### Changed
|
||||||
|
|
||||||
|
- letsencrypt stack refactored with acme.sh
|
||||||
- "--letsencrypt=subdomain" option
|
- "--letsencrypt=subdomain" option
|
||||||
|
|
||||||
#### Fixed
|
#### Fixed
|
||||||
|
|||||||
@@ -311,22 +311,22 @@ class WOSiteCreateController(CementBaseController):
|
|||||||
(['--mysql'],
|
(['--mysql'],
|
||||||
dict(help="create mysql site", action='store_true')),
|
dict(help="create mysql site", action='store_true')),
|
||||||
(['--wp'],
|
(['--wp'],
|
||||||
dict(help="create wordpress single site",
|
dict(help="create WordPress single site",
|
||||||
action='store_true')),
|
action='store_true')),
|
||||||
(['--wpsubdir'],
|
(['--wpsubdir'],
|
||||||
dict(help="create wordpress multisite with subdirectory setup",
|
dict(help="create WordPress multisite with subdirectory setup",
|
||||||
action='store_true')),
|
action='store_true')),
|
||||||
(['--wpsubdomain'],
|
(['--wpsubdomain'],
|
||||||
dict(help="create wordpress multisite with subdomain setup",
|
dict(help="create WordPress multisite with subdomain setup",
|
||||||
action='store_true')),
|
action='store_true')),
|
||||||
(['--wpfc'],
|
(['--wpfc'],
|
||||||
dict(help="create wordpress single/multi site with wpfc cache",
|
dict(help="create WordPress single/multi site with wpfc cache",
|
||||||
action='store_true')),
|
action='store_true')),
|
||||||
(['--wpsc'],
|
(['--wpsc'],
|
||||||
dict(help="create wordpress single/multi site with wpsc cache",
|
dict(help="create WordPress single/multi site with wpsc cache",
|
||||||
action='store_true')),
|
action='store_true')),
|
||||||
(['--wpredis'],
|
(['--wpredis'],
|
||||||
dict(help="create wordpress single/multi site with redis cache",
|
dict(help="create WordPress single/multi site with redis cache",
|
||||||
action='store_true')),
|
action='store_true')),
|
||||||
(['-le', '--letsencrypt'],
|
(['-le', '--letsencrypt'],
|
||||||
dict(help="configure letsencrypt ssl for the site",
|
dict(help="configure letsencrypt ssl for the site",
|
||||||
@@ -334,16 +334,18 @@ class WOSiteCreateController(CementBaseController):
|
|||||||
choices=('on', 'subdomain', 'wildcard'),
|
choices=('on', 'subdomain', 'wildcard'),
|
||||||
const='on', nargs='?')),
|
const='on', nargs='?')),
|
||||||
(['--user'],
|
(['--user'],
|
||||||
dict(help="provide user for wordpress site")),
|
dict(help="provide user for WordPress site")),
|
||||||
(['--email'],
|
(['--email'],
|
||||||
dict(help="provide email address for wordpress site")),
|
dict(help="provide email address for WordPress site")),
|
||||||
(['--pass'],
|
(['--pass'],
|
||||||
dict(help="provide password for wordpress user",
|
dict(help="provide password for WordPress user",
|
||||||
dest='wppass')),
|
dest='wppass')),
|
||||||
(['--proxy'],
|
(['--proxy'],
|
||||||
dict(help="create proxy for site", nargs='+')),
|
dict(help="create proxy for site", nargs='+')),
|
||||||
|
(['--vhostonly'],
|
||||||
|
dict(help="only create vhost and database without installing WordPress", nargs='+')),
|
||||||
(['--experimental'],
|
(['--experimental'],
|
||||||
dict(help="Enable Experimenal packages without prompt",
|
dict(help="Enable Experimental packages without prompt",
|
||||||
action='store_true')),
|
action='store_true')),
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -447,45 +449,22 @@ class WOSiteCreateController(CementBaseController):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if data and self.app.pargs.php73:
|
if data and self.app.pargs.php73:
|
||||||
if (self.app.pargs.experimental):
|
data['php73'] = True
|
||||||
Log.info(
|
php73 = 1
|
||||||
self, "Do you wish to install PHP 7.3 now for {0}?".format(wo_domain))
|
|
||||||
|
|
||||||
# Check prompt
|
|
||||||
check_prompt = input("Type \"y\" to continue [n]:")
|
|
||||||
if check_prompt != "Y" and check_prompt != "y":
|
|
||||||
Log.info(self, "Not using PHP 7.3 for site.")
|
|
||||||
data['php73'] = True
|
|
||||||
data['basic'] = True
|
|
||||||
php73 = 1
|
|
||||||
self.app.pargs.php73 = True
|
|
||||||
else:
|
|
||||||
data['php73'] = True
|
|
||||||
php73 = 1
|
|
||||||
else:
|
|
||||||
data['php73'] = True
|
|
||||||
php73 = 1
|
|
||||||
elif data:
|
elif data:
|
||||||
data['php73'] = False
|
data['php73'] = False
|
||||||
php73 = 0
|
php73 = 0
|
||||||
|
|
||||||
if (not self.app.pargs.wpfc) and (not self.app.pargs.wpsc) and (not self.app.pargs.wpredis):
|
if ((not self.app.pargs.wpfc) and
|
||||||
|
(not self.app.pargs.wpsc) and
|
||||||
|
(not self.app.pargs.wpredis)):
|
||||||
data['basic'] = True
|
data['basic'] = True
|
||||||
|
|
||||||
if (cache == 'wpredis' and (self.app.pargs.experimental)):
|
if (cache == 'wpredis):
|
||||||
Log.info(self, "Redis is experimental feature and it may not "
|
cache = 'wpredis'
|
||||||
"work with all CSS/JS/Cache of your site.\nYou can "
|
data['wpredis'] = True
|
||||||
"disable it by changing cache later.\nDo you wish"
|
data['basic'] = False
|
||||||
" to enable Redis now for {0}?".format(wo_domain))
|
self.app.pargs.wpredis = True
|
||||||
|
|
||||||
# Check prompt
|
|
||||||
check_prompt = input("Type \"y\" to continue [n]:")
|
|
||||||
if check_prompt != "Y" and check_prompt != "y":
|
|
||||||
Log.error(self, "Not using Redis for site")
|
|
||||||
cache = 'basic'
|
|
||||||
data['wpredis'] = False
|
|
||||||
data['basic'] = True
|
|
||||||
self.app.pargs.wpredis = False
|
|
||||||
|
|
||||||
# Check rerequired packages are installed or not
|
# Check rerequired packages are installed or not
|
||||||
wo_auth = site_package_check(self, stype)
|
wo_auth = site_package_check(self, stype)
|
||||||
@@ -1107,21 +1086,8 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
|
|
||||||
if pargs.letsencrypt == "on" or pargs.php73 == "on":
|
if pargs.letsencrypt == "on" or pargs.php73 == "on":
|
||||||
if pargs.php73 == "on":
|
if pargs.php73 == "on":
|
||||||
if pargs.experimental:
|
data['php73'] = True
|
||||||
Log.info(
|
php73 = True
|
||||||
self, "Do you wish to enable PHP 7.3 now for {0}?".format(wo_domain))
|
|
||||||
|
|
||||||
check_prompt = input("Type \"y\" to continue [n]:")
|
|
||||||
if check_prompt != "Y" and check_prompt != "y":
|
|
||||||
Log.info(self, "Not using PHP 7.3 for site")
|
|
||||||
data['php73'] = False
|
|
||||||
php73 = False
|
|
||||||
else:
|
|
||||||
data['php73'] = True
|
|
||||||
php73 = True
|
|
||||||
else:
|
|
||||||
data['php73'] = True
|
|
||||||
php73 = True
|
|
||||||
|
|
||||||
if pargs.letsencrypt == "on":
|
if pargs.letsencrypt == "on":
|
||||||
if oldsitetype in ['wpsubdomain']:
|
if oldsitetype in ['wpsubdomain']:
|
||||||
@@ -1134,21 +1100,12 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
wildcard = True
|
wildcard = True
|
||||||
|
|
||||||
if pargs.wpredis and data['currcachetype'] != 'wpredis':
|
if pargs.wpredis and data['currcachetype'] != 'wpredis':
|
||||||
if pargs.experimental:
|
data['wpredis'] = True
|
||||||
Log.info(self, "Redis is experimental feature and it may not"
|
data['basic'] = False
|
||||||
" work with all plugins of your site.\nYou can "
|
cache = 'wpredis'
|
||||||
"disable it by changing cache type later.\nDo you wish"
|
|
||||||
" to enable Redis now for {0}?".format(wo_domain))
|
|
||||||
|
|
||||||
# Check prompt
|
if (php73 is old_php73) and (stype == oldsitetype and
|
||||||
check_prompt = input("Type \"y\" to continue [n]: ")
|
cache == oldcachetype):
|
||||||
if check_prompt != "Y" and check_prompt != "y":
|
|
||||||
Log.error(self, "Not using Redis for site")
|
|
||||||
data['wpredis'] = False
|
|
||||||
data['basic'] = True
|
|
||||||
cache = 'basic'
|
|
||||||
|
|
||||||
if (php73 is old_php73) and (stype == oldsitetype and cache == oldcachetype):
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
@@ -1258,7 +1215,8 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
Log.error(self, "service nginx reload failed. "
|
Log.error(self, "service nginx reload failed. "
|
||||||
"check issues with `nginx -t` command")
|
"check issues with `nginx -t` command")
|
||||||
|
|
||||||
Log.info(self, "Congratulations! Successfully Configured SSl for Site "
|
Log.info(self, "Congratulations! Successfully"
|
||||||
|
" Configured SSL for Site "
|
||||||
" https://{0}".format(wo_domain))
|
" https://{0}".format(wo_domain))
|
||||||
|
|
||||||
if (SSL.getExpirationDays(self, wo_domain) > 0):
|
if (SSL.getExpirationDays(self, wo_domain) > 0):
|
||||||
@@ -1266,7 +1224,8 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
str(SSL.getExpirationDays(self, wo_domain)) + " days.")
|
str(SSL.getExpirationDays(self, wo_domain)) + " days.")
|
||||||
else:
|
else:
|
||||||
Log.warn(
|
Log.warn(
|
||||||
self, "Your cert already EXPIRED ! .PLEASE renew soon . ")
|
self, "Your cert already EXPIRED !"
|
||||||
|
" PLEASE renew soon . ")
|
||||||
|
|
||||||
elif data['letsencrypt'] is False:
|
elif data['letsencrypt'] is False:
|
||||||
if os.path.isfile("{0}/conf/nginx/ssl.conf"
|
if os.path.isfile("{0}/conf/nginx/ssl.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user