From d72cf9ba4934f80880bad7685bb3980ef8f68c8b Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Thu, 13 Apr 2023 01:06:35 +0500 Subject: [PATCH] attempt 1 to fix: https://github.com/usmannasir/cyberpanel/issues/1044 --- plogical/sslUtilities.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plogical/sslUtilities.py b/plogical/sslUtilities.py index b006d7c69..f8306941b 100755 --- a/plogical/sslUtilities.py +++ b/plogical/sslUtilities.py @@ -91,6 +91,7 @@ class sslUtilities: WriteToFile = open(completePathToConfigFile, 'a') content = ''' + context /.well-known/acme-challenge { location /usr/local/lsws/Example/html/.well-known/acme-challenge allowBrowse 1 @@ -411,8 +412,6 @@ context /.well-known/acme-challenge { command = f'touch {CustomVerificationFile}' ProcessUtilities.normalExecutioner(command) - WWWStatus = 0 - NONWWWStatus = 0 URLFetchPathWWW = f'http://www.{virtualHostName}/.well-known/acme-challenge/{virtualHostName}' URLFetchPathNONWWW = f'http://{virtualHostName}/.well-known/acme-challenge/{virtualHostName}' @@ -441,6 +440,9 @@ context /.well-known/acme-challenge { logging.CyberCPLogFileWriter.writeToFile( f'Status Code: Unkown for: {URLFetchPathNONWWW}. Error: {str(msg)}') + WWWStatus = 1 + NONWWWStatus = 1 + try: acmePath = '/root/.acme.sh/acme.sh'