Merge branch 'v2.3.4' of https://github.com/usmannasir/cyberpanel into v2.3.4

This commit is contained in:
unknown
2023-08-08 11:01:26 +05:00
21 changed files with 462 additions and 249 deletions

View File

@@ -181,7 +181,7 @@ LoadModule mpm_event_module modules/mod_mpm_event.so
if ProcessUtilities.executioner(command, None, True) == 0: if ProcessUtilities.executioner(command, None, True) == 0:
return "Apache run apache2-suexec-pristine" return "Apache run apache2-suexec-pristine"
command = 'a2enmod suexec proxy ssl proxy_fcgi proxy rewrite' command = 'a2enmod suexec proxy ssl proxy_fcgi proxy rewrite headers'
if ProcessUtilities.executioner(command, None, True) == 0: if ProcessUtilities.executioner(command, None, True) == 0:
return "Apache run suexec proxy ssl" return "Apache run suexec proxy ssl"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -90,7 +90,7 @@
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css"> href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="{% static 'baseTemplate/custom-js/pnotify.custom.min.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'baseTemplate/custom-js/pnotify.custom.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'websiteFunctions/websiteFunctions.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'websiteFunctions/websiteFunctions.css' %}">
<link rel="icon" type="image/png" href="{% static 'baseTemplate/assets/finalBase/favicon.png' %}"> <link rel="icon" type="image/x-icon" href="{% static 'baseTemplate/assets/finalBase/favicon.png' %}">
<link type="text/css" href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" <link type="text/css" href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css"
rel="stylesheet"/> rel="stylesheet"/>
{% block styles %} {% block styles %}
@@ -448,10 +448,10 @@
title="{% trans 'List Websites' %}"><span>{% trans "List Websites" %}</span></a> title="{% trans 'List Websites' %}"><span>{% trans "List Websites" %}</span></a>
</li> </li>
<li><a href="{% url 'CreateNewDomain' %}" <li><a href="{% url 'CreateNewDomain' %}"
title="{% trans 'Create New Domain' %}"><span>{% trans "Create New Domain" %}</span></a> title="{% trans 'Create Sub-Domain' %}"><span>{% trans "Create Sub-Domain" %}</span></a>
</li> </li>
<li><a href="{% url 'listChildDomains' %}" <li><a href="{% url 'listChildDomains' %}"
title="{% trans 'List Domains' %}"><span>{% trans "List Domains" %}</span></a> title="{% trans 'List Sub-Domains' %}"><span>{% trans "List Sub-Domains" %}</span></a>
</li> </li>
{% if admin or modifyWebsite %} {% if admin or modifyWebsite %}
<li><a href="{% url 'modifyWebsite' %}" <li><a href="{% url 'modifyWebsite' %}"

View File

@@ -1040,6 +1040,10 @@ else
DEBIAN_FRONTEND=noninteractive apt install -y python3-venv DEBIAN_FRONTEND=noninteractive apt install -y python3-venv
Check_Return Check_Return
DEBIAN_FRONTEND=noninteractive apt install -y cron inetutils-ping
Check_Return
# Oracle Ubuntu ARM misses ping and cron
DEBIAN_FRONTEND=noninteractive apt install -y locales DEBIAN_FRONTEND=noninteractive apt install -y locales
locale-gen "en_US.UTF-8" locale-gen "en_US.UTF-8"
update-locale LC_ALL="en_US.UTF-8" update-locale LC_ALL="en_US.UTF-8"
@@ -1876,7 +1880,7 @@ echo "echo \$@ > /etc/cyberpanel/adminPass" >> /usr/bin/adminPass
chmod 700 /usr/bin/adminPass chmod 700 /usr/bin/adminPass
rm -f /usr/bin/php rm -f /usr/bin/php
ln -s /usr/local/lsws/lsphp74/bin/php /usr/bin/php ln -s /usr/local/lsws/lsphp80/bin/php /usr/bin/php
if [[ "$Server_OS" = "CentOS" ]] ; then if [[ "$Server_OS" = "CentOS" ]] ; then
#all centos 7/8 post change goes here #all centos 7/8 post change goes here

View File

@@ -108,8 +108,8 @@ if [[ ! -f /etc/os-release ]] ; then
exit exit
fi fi
if ! uname -m | grep -q x86_64 ; then if ! uname -m | grep -qE 'x86_64|aarch64' ; then
echo -e "x86_64 system is required...\n" echo -e "x86_64 or ARM system is required...\n"
exit exit
fi fi

View File

@@ -19,7 +19,7 @@ check_OS() {
Server_OS="AlmaLinux" Server_OS="AlmaLinux"
elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then
Server_OS="CloudLinux" Server_OS="CloudLinux"
elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10" /etc/os-release ; then elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10|Ubuntu 22.04" /etc/os-release ; then
Server_OS="Ubuntu" Server_OS="Ubuntu"
elif grep -q -E "Rocky Linux" /etc/os-release ; then elif grep -q -E "Rocky Linux" /etc/os-release ; then
Server_OS="RockyLinux" Server_OS="RockyLinux"
@@ -28,8 +28,7 @@ check_OS() {
else else
echo -e "Unable to detect your system..." echo -e "Unable to detect your system..."
echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n" echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
Debug_Log2 "CyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03... [404]" exit
exit
fi fi
Server_OS_Version=$(grep VERSION_ID /etc/os-release | awk -F[=,] '{print $2}' | tr -d \" | head -c2 | tr -d . ) Server_OS_Version=$(grep VERSION_ID /etc/os-release | awk -F[=,] '{print $2}' | tr -d \" | head -c2 | tr -d . )

View File

@@ -209,7 +209,8 @@ class FileManager:
try: try:
currentFile = items.split(' ') currentFile = items.split(' ')
currentFile = [a for a in currentFile if a != ''] currentFile = [a for a in currentFile if a != '']
if currentFile[-1] == '.' or currentFile[-1] == '..' or currentFile[0] == 'total':
if currentFile[-1] == '.' or currentFile[-1] == '..' or currentFile[0] == 'total' or currentFile[-1].startswith('mail.'):
continue continue
if len(currentFile) > 9: if len(currentFile) > 9:

View File

@@ -102,7 +102,7 @@ class preFlightsChecks:
debug = 1 debug = 1
cyberPanelMirror = "mirror.cyberpanel.net/pip" cyberPanelMirror = "mirror.cyberpanel.net/pip"
cdn = 'cyberpanel.sh' cdn = 'cyberpanel.sh'
SnappyVersion = '2.25.3' SnappyVersion = '2.28.1'
def __init__(self, rootPath, ip, path, cwd, cyberPanelPath, distro, remotemysql=None, mysqlhost=None, mysqldb=None, def __init__(self, rootPath, ip, path, cwd, cyberPanelPath, distro, remotemysql=None, mysqlhost=None, mysqldb=None,
mysqluser=None, mysqlpassword=None, mysqlport=None): mysqluser=None, mysqlpassword=None, mysqlport=None):
@@ -1403,7 +1403,7 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
command = f'wget -O /usr/local/CyberCP/snappymail_cyberpanel.php https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/cyberpanel/install.php' command = f'wget -O /usr/local/CyberCP/snappymail_cyberpanel.php https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/cyberpanel/install.php'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = f'/usr/local/lsws/lsphp74/bin/php /usr/local/CyberCP/snappymail_cyberpanel.php' command = f'/usr/local/lsws/lsphp80/bin/php /usr/local/CyberCP/snappymail_cyberpanel.php'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
@@ -1551,11 +1551,36 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
lscpdPath = '/usr/local/lscp/bin/lscpd' lscpdPath = '/usr/local/lscp/bin/lscpd'
lscpdSelection = 'lscpd-0.3.1' # if subprocess.check_output('uname -a').decode("utf-8").find("aarch64") == -1:
if os.path.exists('/etc/lsb-release'): # lscpdPath = '/usr/local/lscp/bin/lscpd'
result = open('/etc/lsb-release', 'r').read() #
if result.find('22.04') > -1: # lscpdSelection = 'lscpd-0.3.1'
lscpdSelection = 'lscpd.0.4.0' # if os.path.exists('/etc/lsb-release'):
# result = open('/etc/lsb-release', 'r').read()
# if result.find('22.04') > -1:
# lscpdSelection = 'lscpd.0.4.0'
# else:
# lscpdSelection = 'lscpd.aarch64'
try:
result = subprocess.run('uname -a', capture_output=True, text=True, shell=True)
if result.stdout.find('aarch64') == -1:
lscpdSelection = 'lscpd-0.3.1'
if os.path.exists('/etc/lsb-release'):
result = open('/etc/lsb-release', 'r').read()
if result.find('22.04') > -1:
lscpdSelection = 'lscpd.0.4.0'
else:
lscpdSelection = 'lscpd.aarch64'
except:
lscpdSelection = 'lscpd-0.3.1'
if os.path.exists('/etc/lsb-release'):
result = open('/etc/lsb-release', 'r').read()
if result.find('22.04') > -1:
lscpdSelection = 'lscpd.0.4.0'
command = f'cp -f /usr/local/CyberCP/{lscpdSelection} /usr/local/lscp/bin/{lscpdSelection}' command = f'cp -f /usr/local/CyberCP/{lscpdSelection} /usr/local/lscp/bin/{lscpdSelection}'
@@ -1577,7 +1602,7 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
try: try:
os.remove("/usr/local/lscp/fcgi-bin/lsphp") os.remove("/usr/local/lscp/fcgi-bin/lsphp")
shutil.copy("/usr/local/lsws/lsphp74/bin/lsphp", "/usr/local/lscp/fcgi-bin/lsphp") shutil.copy("/usr/local/lsws/lsphp80/bin/lsphp", "/usr/local/lscp/fcgi-bin/lsphp")
except: except:
pass pass

View File

@@ -505,7 +505,7 @@ class InstallCyberPanel:
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
if get_Ubuntu_release() > 20: if get_Ubuntu_release() > 21.00:
### change mysql md5 to crypt ### change mysql md5 to crypt
command = "sed -i 's/MYSQLCrypt md5/MYSQLCrypt crypt/g' /etc/pure-ftpd/db/mysql.conf" command = "sed -i 's/MYSQLCrypt md5/MYSQLCrypt crypt/g' /etc/pure-ftpd/db/mysql.conf"

BIN
lscpd.aarch64 Normal file

Binary file not shown.

View File

@@ -518,7 +518,6 @@ class MailServerManager(multi.Thread):
else: else:
return ACLManager.loadErrorJson() return ACLManager.loadErrorJson()
try: try:
emailDomain = Domains.objects.get(domain=selectedDomain) emailDomain = Domains.objects.get(domain=selectedDomain)
except: except:
raise BaseException('No emails exist for this domain.') raise BaseException('No emails exist for this domain.')

View File

@@ -50,6 +50,8 @@ class CPBackupsV2(multi.Thread):
except: except:
pass pass
statusRes, message = self.InstallRustic()
### set self.website as it is needed in many functions ### set self.website as it is needed in many functions
from websiteFunctions.models import Websites from websiteFunctions.models import Websites
self.website = Websites.objects.get(domain=self.data['domain']) self.website = Websites.objects.get(domain=self.data['domain'])

View File

@@ -31,7 +31,7 @@ class ApplicationInstaller(multi.Thread):
LOCALHOST = 'localhost' LOCALHOST = 'localhost'
REMOTE = 0 REMOTE = 0
PORT = '3306' PORT = '3306'
MauticVersion = '4.1.2' MauticVersion = '4.4.0'
PrestaVersion = '1.7.8.3' PrestaVersion = '1.7.8.3'
def __init__(self, installApp, extraArgs): def __init__(self, installApp, extraArgs):
@@ -242,7 +242,7 @@ $parameters = array(
command = 'cp %s %s/app/config/local.php' % (localDB, finalPath) command = 'cp %s %s/app/config/local.php' % (localDB, finalPath)
ProcessUtilities.executioner(command, externalApp) ProcessUtilities.executioner(command, externalApp)
command = "/usr/local/lsws/lsphp74/bin/php bin/console mautic:install http://%s -f" % (finalURL) command = "/usr/local/lsws/lsphp80/bin/php bin/console mautic:install http://%s -f" % (finalURL)
result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath) result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath)
if result.find('Install complete') == -1: if result.find('Install complete') == -1:
@@ -1692,20 +1692,21 @@ $parameters = array(
DataToPass['domainName'] = self.data['domainName'] DataToPass['domainName'] = self.data['domainName']
DataToPass['adminEmail'] = self.data['adminEmail'] DataToPass['adminEmail'] = self.data['adminEmail']
DataToPass['phpSelection'] = "PHP 7.4" DataToPass['phpSelection'] = "PHP 8.0"
DataToPass['websiteOwner'] = self.data['websiteOwner'] DataToPass['websiteOwner'] = self.data['websiteOwner']
DataToPass['package'] = self.data['package'] DataToPass['package'] = self.data['package']
DataToPass['ssl'] = 1 DataToPass['ssl'] = 1
DataToPass['dkimCheck'] = 0 DataToPass['dkimCheck'] = 0
DataToPass['openBasedir'] = 0 DataToPass['openBasedir'] = 0
DataToPass['mailDomain'] = 0 DataToPass['mailDomain'] = 0
DataToPass['apacheBackend'] = self.extraArgs['apacheBackend']
UserID = self.data['adminID'] UserID = self.data['adminID']
try: try:
website = Websites.objects.get(domain=DataToPass['domainName']) website = Websites.objects.get(domain=DataToPass['domainName'])
if website.phpSelection == 'PHP 7.3': if website.phpSelection == 'PHP 7.3':
website.phpSelection = 'PHP 7.4' website.phpSelection = 'PHP 8.0'
website.save() website.save()
if ACLManager.checkOwnership(website.domain, self.extraArgs['adminID'], if ACLManager.checkOwnership(website.domain, self.extraArgs['adminID'],

View File

@@ -23,17 +23,20 @@ class ChildDomainManager:
checker = 0 checker = 0
for items in childDomains: for items in childDomains:
dic = { if items.domain == f'mail.{master.domain}':
'childDomain': items.domain, pass
'path': items.path,
'childLunch': '/websites/' + self.masterDomain + '/' + items.domain
}
if checker == 0:
json_data = json_data + json.dumps(dic)
checker = 1
else: else:
json_data = json_data + ',' + json.dumps(dic) dic = {
'childDomain': items.domain,
'path': items.path,
'childLunch': '/websites/' + self.masterDomain + '/' + items.domain
}
if checker == 0:
json_data = json_data + json.dumps(dic)
checker = 1
else:
json_data = json_data + ',' + json.dumps(dic)
json_data = json_data + ']' json_data = json_data + ']'

View File

@@ -438,7 +438,7 @@ class sslUtilities:
try: try:
command = acmePath + f" --issue -d {virtualHostName} -d *.{virtualHostName}" \ command = acmePath + f" --issue -d {virtualHostName} -d *.{virtualHostName}" \
+ ' --cert-file ' + existingCertPath + '/cert.pem' + ' --key-file ' + existingCertPath + '/privkey.pem' \ + ' --cert-file ' + existingCertPath + '/cert.pem' + ' --key-file ' + existingCertPath + '/privkey.pem' \
+ ' --fullchain-file ' + existingCertPath + '/fullchain.pem' + f' --dns {DNS_TO_USE} -k ec-256 --force --server letsencrypt' + ' --fullchain-file ' + existingCertPath + '/fullchain.pem' + f' --dns {DNS_TO_USE} -k ec-256 --force --server letsencrypt --dnssleep 20'
#ResultText = open(logging.CyberCPLogFileWriter.fileName, 'r').read() #ResultText = open(logging.CyberCPLogFileWriter.fileName, 'r').read()
#CurrentMessage = "Trying to obtain SSL for: " + virtualHostName + " and: www." + virtualHostName #CurrentMessage = "Trying to obtain SSL for: " + virtualHostName + " and: www." + virtualHostName
# logging.CyberCPLogFileWriter.writeToFile(CurrentMessage, 0) # logging.CyberCPLogFileWriter.writeToFile(CurrentMessage, 0)
@@ -461,7 +461,7 @@ class sslUtilities:
try: try:
command = acmePath + " --issue -d " + virtualHostName + ' --cert-file ' + existingCertPath \ command = acmePath + " --issue -d " + virtualHostName + ' --cert-file ' + existingCertPath \
+ '/cert.pem' + ' --key-file ' + existingCertPath + '/privkey.pem' \ + '/cert.pem' + ' --key-file ' + existingCertPath + '/privkey.pem' \
+ ' --fullchain-file ' + existingCertPath + '/fullchain.pem' + f' --dns {DNS_TO_USE} -k ec-256 --force --server letsencrypt' + ' --fullchain-file ' + existingCertPath + '/fullchain.pem' + f' --dns {DNS_TO_USE} -k ec-256 --force --server letsencrypt --dnssleep 20'
#ResultText = open(logging.CyberCPLogFileWriter.fileName, 'r').read() #ResultText = open(logging.CyberCPLogFileWriter.fileName, 'r').read()
CurrentMessage = '%s\nTrying to obtain SSL for: %s' % (finalText, virtualHostName) CurrentMessage = '%s\nTrying to obtain SSL for: %s' % (finalText, virtualHostName)
@@ -495,7 +495,7 @@ class sslUtilities:
command = acmePath + " --issue -d " + virtualHostName + " -d www." + virtualHostName \ command = acmePath + " --issue -d " + virtualHostName + " -d www." + virtualHostName \
+ ' -d ' + aliasDomain + ' -d www.' + aliasDomain\ + ' -d ' + aliasDomain + ' -d www.' + aliasDomain\
+ ' --cert-file ' + existingCertPath + '/cert.pem' + ' --key-file ' + existingCertPath + '/privkey.pem' \ + ' --cert-file ' + existingCertPath + '/cert.pem' + ' --key-file ' + existingCertPath + '/privkey.pem' \
+ ' --fullchain-file ' + existingCertPath + '/fullchain.pem' + f' --dns {DNS_TO_USE} -k ec-256 --force --server letsencrypt' + ' --fullchain-file ' + existingCertPath + '/fullchain.pem' + f' --dns {DNS_TO_USE} -k ec-256 --force --server letsencrypt --dnssleep 20'
output = subprocess.check_output(shlex.split(command)).decode("utf-8") output = subprocess.check_output(shlex.split(command)).decode("utf-8")
logging.CyberCPLogFileWriter.writeToFile( logging.CyberCPLogFileWriter.writeToFile(

View File

@@ -38,7 +38,7 @@ class Upgrade:
UbuntuPath = '/etc/lsb-release' UbuntuPath = '/etc/lsb-release'
openEulerPath = '/etc/openEuler-release' openEulerPath = '/etc/openEuler-release'
FromCloud = 0 FromCloud = 0
SnappyVersion = '2.25.3' SnappyVersion = '2.28.1'
AdminACL = '{"adminStatus":1, "versionManagement": 1, "createNewUser": 1, "listUsers": 1, "deleteUser":1 , "resellerCenter": 1, ' \ AdminACL = '{"adminStatus":1, "versionManagement": 1, "createNewUser": 1, "listUsers": 1, "deleteUser":1 , "resellerCenter": 1, ' \
'"changeUserACL": 1, "createWebsite": 1, "modifyWebsite": 1, "suspendWebsite": 1, "deleteWebsite": 1, ' \ '"changeUserACL": 1, "createWebsite": 1, "modifyWebsite": 1, "suspendWebsite": 1, "deleteWebsite": 1, ' \
@@ -513,7 +513,7 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
command = f'wget -O /usr/local/CyberCP/snappymail_cyberpanel.php https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/cyberpanel/install.php' command = f'wget -O /usr/local/CyberCP/snappymail_cyberpanel.php https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/cyberpanel/install.php'
Upgrade.executioner(command, 'verify certificate', 0) Upgrade.executioner(command, 'verify certificate', 0)
command = f'/usr/local/lsws/lsphp74/bin/php /usr/local/CyberCP/snappymail_cyberpanel.php' command = f'/usr/local/lsws/lsphp80/bin/php /usr/local/CyberCP/snappymail_cyberpanel.php'
Upgrade.executioner(command, 'verify certificate', 0) Upgrade.executioner(command, 'verify certificate', 0)
# labsPath = '/usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/application.ini' # labsPath = '/usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/application.ini'
@@ -2161,11 +2161,26 @@ CREATE TABLE `websiteFunctions_backupsv2` (`id` integer AUTO_INCREMENT NOT NULL
if os.path.exists(lscpdPath): if os.path.exists(lscpdPath):
os.remove(lscpdPath) os.remove(lscpdPath)
lscpdSelection = 'lscpd-0.3.1'
if os.path.exists(Upgrade.UbuntuPath): try:
result = open(Upgrade.UbuntuPath, 'r').read() result = subprocess.run('uname -a', capture_output=True, text=True, shell=True)
if result.find('22.04') > -1:
lscpdSelection = 'lscpd.0.4.0' if result.stdout.find('aarch64') == -1:
lscpdSelection = 'lscpd-0.3.1'
if os.path.exists(Upgrade.UbuntuPath):
result = open(Upgrade.UbuntuPath, 'r').read()
if result.find('22.04') > -1:
lscpdSelection = 'lscpd.0.4.0'
else:
lscpdSelection = 'lscpd.aarch64'
except:
lscpdSelection = 'lscpd-0.3.1'
if os.path.exists(Upgrade.UbuntuPath):
result = open(Upgrade.UbuntuPath, 'r').read()
if result.find('22.04') > -1:
lscpdSelection = 'lscpd.0.4.0'
command = f'cp -f /usr/local/CyberCP/{lscpdSelection} /usr/local/lscp/bin/{lscpdSelection}' command = f'cp -f /usr/local/CyberCP/{lscpdSelection} /usr/local/lscp/bin/{lscpdSelection}'
Upgrade.executioner(command, command, 0) Upgrade.executioner(command, command, 0)
@@ -3006,7 +3021,7 @@ vmail
except: except:
pass pass
command = 'cp /usr/local/lsws/lsphp74/bin/lsphp %s' % (phpPath) command = 'cp /usr/local/lsws/lsphp80/bin/lsphp %s' % (phpPath)
Upgrade.executioner(command, 0) Upgrade.executioner(command, 0)
try: try:

View File

@@ -301,6 +301,14 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
$scope.currentStatus = "Starting creation.."; $scope.currentStatus = "Starting creation..";
var apacheBackend = 0;
if ($scope.apacheBackend === true) {
apacheBackend = 1;
} else {
apacheBackend = 0
}
var package = $scope.packageForWebsite; var package = $scope.packageForWebsite;
var websiteOwner = $scope.websiteOwner; var websiteOwner = $scope.websiteOwner;
var WPtitle = $scope.WPtitle; var WPtitle = $scope.WPtitle;
@@ -361,6 +369,7 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
package: package, package: package,
home: home, home: home,
path: path, path: path,
apacheBackend: apacheBackend
} }
var config = { var config = {
@@ -530,7 +539,7 @@ function create_staging_checkbox_function() {
document.getElementById('Website_Create_Own_Domain').style.display = "block"; document.getElementById('Website_Create_Own_Domain').style.display = "block";
create_staging_domain_check = 1; create_staging_domain_check = 1;
} }
}catch (e) { } catch (e) {
} }

View File

@@ -7,212 +7,331 @@
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} --> <!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container"> {% if apachemanager %}
<div id="page-title"> <div class="container">
<h2>{% trans "Apache Manager" %}</h2> <div id="page-title">
<p>{% trans "Switch between Apache (as reverse proxy) and OpenLiteSpeed." %}</p> <h2>{% trans "Apache Manager" %}</h2>
</div> <p>{% trans "Switch between Apache (as reverse proxy) and OpenLiteSpeed." %}</p>
</div>
<div ng-controller="ApacheManager" class="panel"> <div ng-controller="ApacheManager" class="panel">
<div class="panel-body"> <div class="panel-body">
<h3 class="title-hero"> <h3 class="title-hero">
<span id="domainNamePage">{{ domainName }}</span> <img ng-hide="cyberpanelloading" <span id="domainNamePage">{{ domainName }}</span> <img ng-hide="cyberpanelloading"
src="{% static 'images/loading.gif' %}"> src="{% static 'images/loading.gif' %}">
</h3> </h3>
<div class="card card-body"> <div class="card card-body">
<h5 ng-hide="apacheOLS" class="card-title">{{ domainName }} is currently using Apache as Reverse <h5 ng-hide="apacheOLS" class="card-title">{{ domainName }} is currently using Apache as Reverse
Proxy to Proxy to
OpenLiteSpeed. <img OpenLiteSpeed. <img
style="height: 25px" ng-hide="cyberpanelloading"
src="{% static 'images/loading.gif' %}"></h5>
<!-- Using Apache -->
<div ng-hide="apacheOLS" class="row">
<div class="col-md-12">
<div class="form-group mb-3">
<label for="example-select">PHP</label>
<select ng-model="phpSelection" class="form-control" id="example-select">
{% for php in phps %}
<option>{{ php }}</option>
{% endfor %}
</select>
</div>
</div>
</div> <!-- end row -->
<a data-toggle="modal" data-target="#bs-example-modal-lg" ng-hide="apacheOLS"
ng-click="switchServer(2)" href="#" class="btn btn-primary">Switch to pure
OpenLiteSpeed.</a>
<div ng-hide="apacheOLS" class="col-md-12">
<form style="margin-top: 2%" class="form-horizontal bordered-row">
<div class="form-group">
<h3 style="margin-bottom: 2%" ng-hide="apacheOLS">Apache Configurations</h3>
<div class="col-sm-12">
<textarea ng-model="configData" rows="20" class="form-control"></textarea>
</div>
<div ng-hide="saveConfigBtn" class="form-group">
<div style="margin: 2%" class="col-sm-4">
<button type="button" ng-click="saveApacheConfig()"
class="btn btn-primary btn-lg">{% trans "Save Apache Configurations" %}</button>
</div>
</div>
</div>
</form>
<hr>
<!-- Tune FPM -->
<div class="card card-body">
<h3 style="margin-bottom: 2%" ng-hide="apacheOLS">PHP-FPM Configurations <img
style="height: 25px" ng-hide="cyberpanelloading" style="height: 25px" ng-hide="cyberpanelloading"
src="{% static 'images/loading.gif' %}"></h3> src="{% static 'images/loading.gif' %}"></h5>
<!-- Using Apache --> <!-- Using Apache -->
<form ng-hide="apacheOLS"> <div ng-hide="apacheOLS" class="row">
<div class="row"> <div class="col-md-12">
<div class="col-md-6"> <div class="form-group mb-3">
<div class="form-group"> <label for="example-select">PHP</label>
<label for="billing-town-city">pm.max_children</label> <select ng-model="phpSelection" class="form-control" id="example-select">
<input class="form-control" type="text" {% for php in phps %}
ng-model="pmMaxChildren"/> <option>{{ php }}</option>
</div> {% endfor %}
</div> </select>
<div class="col-md-6">
<div class="form-group">
<label for="billing-town-city">pm.start_servers</label>
<input class="form-control" type="text"
ng-model="pmStartServers"/>
</div>
</div>
</div> <!-- end row -->
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="billing-town-city">pm.min_spare_servers</label>
<input class="form-control" type="text"
ng-model="pmMinSpareServers"/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="billing-town-city">pm.max_spare_servers</label>
<input class="form-control" type="text"
ng-model="pmMaxSpareServers"/>
</div>
</div>
</div> <!-- end row -->
</form>
<a ng-hide="apacheOLS" ng-click="tuneSettings()"
href="#" class="btn btn-primary">Tune PHP-FPM Settings.</a>
<!-- Using OpenLiteSpeed -->
<p ng-hide="pureOLS" class="card-text">{{ domainName }} is currently using pure
OpenLiteSpeed, PHP-FPM
is
not used with OpenLiteSpeed, thus tuning is disabled.</p>
<!-- Using OpenLiteSpeed -->
<p ng-hide="lswsEnt" class="card-text">{{ domainName }} is using LiteSpeed Enterprise.
PHP-FPM is not
used
with LiteSpeed
Enterprise.</p>
</div> <!-- end card-->
<!-- Modal content for the above example -->
<div class="modal fade" id="bs-example-modal-lg" tabindex="-1" role="dialog"
aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myLargeModalLabel">{$ functionStatus $} <img
style="height: 25px"
ng-hide="cyberpanelloading"
src="{% static 'images/loading.gif' %}">
</h4>
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×
</button>
</div>
<div class="modal-body">
<div class="progress">
<div ng-style="functionProgress"
class="progress-bar progress-bar-striped bg-info"
role="progressbar"
aria-valuenow="50" aria-valuemin="0"
aria-valuemax="100"></div>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Tune FPM End -->
</div>
<!-- Using OpenLiteSpeed -->
<p ng-hide="pureOLS" class="card-text">{{ domainName }} is currently using pure OpenLiteSpeed.</p>
<div ng-hide="pureOLS" class="row">
<div class="col-md-12">
<div class="form-group mb-3">
<label for="example-select">PHP</label>
<select ng-model="phpSelection" class="form-control" id="example-select">
{% for php in phps %}
<option>{{ php }}</option>
{% endfor %}
</select>
</div>
</div>
</div> <!-- end row -->
<a data-toggle="modal" data-target="#bs-example-modal-lg" ng-hide="pureOLS"
ng-click="switchServer(1)" href="#" class="btn btn-primary">Switch to OpenLiteSpeed +
Apache
as reverse proxy.</a>
<!-- Using OpenLiteSpeed -->
<p ng-hide="lswsEnt" class="card-text">{{ domainName }} is using LiteSpeed Enterprise. When
LiteSpeed
Enterprise is active switching is not required.</p>
</div> <!-- end card-->
<!-- Modal content for the above example -->
<div class="modal fade" id="bs-example-modal-lg" tabindex="-1" role="dialog"
aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myLargeModalLabel">{$ functionStatus $} <img
style="height: 25px"
ng-hide="cyberpanelloading"
src="{% static 'images/loading.gif' %}">
</h4>
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×
</button>
</div>
<div class="modal-body">
<div class="progress">
<div ng-style="functionProgress"
class="progress-bar progress-bar-striped bg-info"
role="progressbar"
aria-valuenow="50" aria-valuemin="0"
aria-valuemax="100"></div>
</div> </div>
</div> </div>
</div><!-- /.modal-content --> </div> <!-- end row -->
</div><!-- /.modal-dialog --> <a data-toggle="modal" data-target="#bs-example-modal-lg" ng-hide="apacheOLS"
</div><!-- /.modal --> ng-click="switchServer(2)" href="#" class="btn btn-primary">Switch to pure
OpenLiteSpeed.</a>
<div ng-hide="apacheOLS" class="col-md-12">
<form style="margin-top: 2%" class="form-horizontal bordered-row">
<div class="form-group">
<h3 style="margin-bottom: 2%" ng-hide="apacheOLS">Apache Configurations</h3>
<div class="col-sm-12">
<textarea ng-model="configData" rows="20" class="form-control"></textarea>
</div>
<div ng-hide="saveConfigBtn" class="form-group">
<div style="margin: 2%" class="col-sm-4">
<button type="button" ng-click="saveApacheConfig()"
class="btn btn-primary btn-lg">{% trans "Save Apache Configurations" %}</button>
</div>
</div>
</div>
</form>
<hr>
<!-- Tune FPM -->
<div class="card card-body">
<h3 style="margin-bottom: 2%" ng-hide="apacheOLS">PHP-FPM Configurations <img
style="height: 25px" ng-hide="cyberpanelloading"
src="{% static 'images/loading.gif' %}"></h3>
<!-- Using Apache -->
<form ng-hide="apacheOLS">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="billing-town-city">pm.max_children</label>
<input class="form-control" type="text"
ng-model="pmMaxChildren"/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="billing-town-city">pm.start_servers</label>
<input class="form-control" type="text"
ng-model="pmStartServers"/>
</div>
</div>
</div> <!-- end row -->
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="billing-town-city">pm.min_spare_servers</label>
<input class="form-control" type="text"
ng-model="pmMinSpareServers"/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="billing-town-city">pm.max_spare_servers</label>
<input class="form-control" type="text"
ng-model="pmMaxSpareServers"/>
</div>
</div>
</div> <!-- end row -->
</form>
<a ng-hide="apacheOLS" ng-click="tuneSettings()"
href="#" class="btn btn-primary">Tune PHP-FPM Settings.</a>
<!-- Using OpenLiteSpeed -->
<p ng-hide="pureOLS" class="card-text">{{ domainName }} is currently using pure
OpenLiteSpeed, PHP-FPM
is
not used with OpenLiteSpeed, thus tuning is disabled.</p>
<!-- Using OpenLiteSpeed -->
<p ng-hide="lswsEnt" class="card-text">{{ domainName }} is using LiteSpeed Enterprise.
PHP-FPM is not
used
with LiteSpeed
Enterprise.</p>
</div> <!-- end card-->
<!-- Modal content for the above example -->
<div class="modal fade" id="bs-example-modal-lg" tabindex="-1" role="dialog"
aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myLargeModalLabel">{$ functionStatus $} <img
style="height: 25px"
ng-hide="cyberpanelloading"
src="{% static 'images/loading.gif' %}">
</h4>
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×
</button>
</div>
<div class="modal-body">
<div class="progress">
<div ng-style="functionProgress"
class="progress-bar progress-bar-striped bg-info"
role="progressbar"
aria-valuenow="50" aria-valuemin="0"
aria-valuemax="100"></div>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Tune FPM End -->
</div>
<!-- Using OpenLiteSpeed -->
<p ng-hide="pureOLS" class="card-text">{{ domainName }} is currently using pure
OpenLiteSpeed.</p>
<div ng-hide="pureOLS" class="row">
<div class="col-md-12">
<div class="form-group mb-3">
<label for="example-select">PHP</label>
<select ng-model="phpSelection" class="form-control" id="example-select">
{% for php in phps %}
<option>{{ php }}</option>
{% endfor %}
</select>
</div>
</div>
</div> <!-- end row -->
<a data-toggle="modal" data-target="#bs-example-modal-lg" ng-hide="pureOLS"
ng-click="switchServer(1)" href="#" class="btn btn-primary">Switch to OpenLiteSpeed +
Apache
as reverse proxy.</a>
<!-- Using OpenLiteSpeed -->
<p ng-hide="lswsEnt" class="card-text">{{ domainName }} is using LiteSpeed Enterprise. When
LiteSpeed
Enterprise is active switching is not required.</p>
</div> <!-- end card-->
<!-- Modal content for the above example -->
<div class="modal fade" id="bs-example-modal-lg" tabindex="-1" role="dialog"
aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myLargeModalLabel">{$ functionStatus $} <img
style="height: 25px"
ng-hide="cyberpanelloading"
src="{% static 'images/loading.gif' %}">
</h4>
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×
</button>
</div>
<div class="modal-body">
<div class="progress">
<div ng-style="functionProgress"
class="progress-bar progress-bar-striped bg-info"
role="progressbar"
aria-valuenow="50" aria-valuemin="0"
aria-valuemax="100"></div>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
</div> </div>
</div> </div>
{% else %}
<style>
h1 {
color: #333;
margin-bottom: 15px;
}
</div> h2 {
color: #555;
margin-bottom: 10px;
}
h3 {
color: #777;
margin-bottom: 5px;
}
p {
color: #444;
margin: 1%;
}
ol {
color: #444;
margin: 1%;
}
</style>
<div class="container">
<div id="page-title" align="center">
<h1><strong>OpenLiteSpeed + Apache as Backend </strong></h1>
<h1>Introducing CyberPanel's Revolutionary Hybrid Web Server: OpenLiteSpeed + Apache!</h1>
<p>
Are you seeking the ultimate web hosting solution that combines blazing-fast performance with
unparalleled feature versatility? Look no further! CyberPanel is proud to present its groundbreaking
new feature: the OpenLiteSpeed + Apache hybrid web server. This cutting-edge innovation is designed
to take your website's performance and functionality to unprecedented heights, offering the best of
both worlds in a single, seamless package.
</p>
<h2>Unmatched Speed with OpenLiteSpeed:</h2>
<p>
Harness the raw power of OpenLiteSpeed, the industry-leading, high-performance web server that
ensures lightning-fast response times and unparalleled efficiency. OpenLiteSpeed is renowned for its
remarkable performance capabilities, enabling your websites to handle a massive influx of traffic
without compromising on speed or reliability. Experience near-instantaneous page loads and swift
data transfers, providing an unbeatable user experience that keeps visitors engaged and coming back
for more.
</p>
<h2>Unrivaled Features with Apache:</h2>
<p>
While OpenLiteSpeed excels in speed and efficiency, we understand that Apache is favored by many web
developers for its extensive feature set and compatibility. CyberPanel's innovative hybrid approach
allows you to harness the full potential of Apache as a backend, granting access to an impressive
array of modules, scripts, and configurations. Enjoy the freedom to leverage the vast Apache
ecosystem, ensuring seamless integration with a wide range of applications and platforms.
</p>
<h2>The Perfect Fusion:</h2>
<p>
By merging OpenLiteSpeed and Apache, CyberPanel has created a truly game-changing web server
solution that combines the unparalleled speed of OpenLiteSpeed with the feature-rich environment of
Apache. The result is a synergistic combination that sets new industry standards, empowering you to
elevate your web hosting to unprecedented levels of performance and functionality.
</p>
<h3>Key Features and Benefits:</h3>
<ol>
<li>Lightning-Fast Performance: Experience unrivaled speed and responsiveness, ensuring your
websites load at blazing speeds, delighting visitors and improving search engine rankings.
</li>
<li>Versatile Feature Set: Harness the extensive features of Apache while benefiting from the speed
and efficiency of OpenLiteSpeed, providing unmatched flexibility and compatibility.
</li>
<li>Enhanced Security: CyberPanel's OpenLiteSpeed + Apache configuration includes robust security
measures to safeguard your websites and data against potential threats.
</li>
<li>Scalability and Stability: Enjoy the ability to handle high traffic loads effortlessly, ensuring
your websites remain stable and responsive under any circumstances.
</li>
<li>Easy Management: CyberPanel's user-friendly interface makes it simple to manage and configure
the OpenLiteSpeed + Apache hybrid web server, even for less experienced users.
</li>
<li>Cost-Effective Solution: Optimize your web hosting infrastructure with CyberPanel's innovative
hybrid web server, eliminating the need for costly hardware upgrades while boosting overall
performance.
</li>
</ol>
<p>
Unleash the true potential of your websites with CyberPanel's OpenLiteSpeed + Apache hybrid web
server. Experience unparalleled speed, efficiency, and versatility in one unified solution. Upgrade
your web hosting experience today and revolutionize the way you deliver content to your audience.
Embrace the future of web hosting with CyberPanel's groundbreaking innovation!
</p>
</div>
<p align="center">
<iframe width="788.54" height="443" src="https://www.youtube.com/embed/ts5wR9G2FsE"
title="YouTube video player" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen></iframe>
</p>
<div style="margin-top: 2%">
<stripe-pricing-table pricing-table-id="prctbl_1MQtdYJMfY1fWGMszc4tx78j"
publishable-key="pk_live_51ITXBmJMfY1fWGMs2G0LAydJweIDMp2WaYocM0xyzdn03WaHUbMw6uxfVuktAkgpRyUql7tz7gF5OwdccEZLd6Ot00XX6tGoZx">
</stripe-pricing-table>
<stripe-pricing-table pricing-table-id="prctbl_1LpSqSJMfY1fWGMsxSNhPLsc"
publishable-key="pk_live_51ITXBmJMfY1fWGMs2G0LAydJweIDMp2WaYocM0xyzdn03WaHUbMw6uxfVuktAkgpRyUql7tz7gF5OwdccEZLd6Ot00XX6tGoZx">
</stripe-pricing-table>
<stripe-pricing-table pricing-table-id="prctbl_1M6WpCJMfY1fWGMsQXFlZWcW"
publishable-key="pk_live_51ITXBmJMfY1fWGMs2G0LAydJweIDMp2WaYocM0xyzdn03WaHUbMw6uxfVuktAkgpRyUql7tz7gF5OwdccEZLd6Ot00XX6tGoZx">
</stripe-pricing-table>
</div>
</div>
{% endif %}
{% endblock %} {% endblock %}

View File

@@ -146,6 +146,25 @@
class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div> class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>
</div> </div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Additional Features" %}</label>
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="checkbox">
<label>
{% if test_domain_data %}
<input ng-model="apacheBackend" type="checkbox" value="">
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22 and AlmaLinux 8)
{% else %}
<input ng-model="apacheBackend" type="checkbox" value="" disabled>
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22 and AlmaLinux 8) - <strong><a href="https://go.cyberpanel.net/ApacheRev">Premium Feature</a> <i class="p fa fa-external-link btn-icon"></i></strong>
{% endif %}
</label>
</div>
</div>
</div>
{# My Work #} {# My Work #}
{# <div ng-hide="installationDetailsForm" class="form-group">#} {# <div ng-hide="installationDetailsForm" class="form-group">#}

View File

@@ -174,8 +174,14 @@
<div class="col-sm-9"> <div class="col-sm-9">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input ng-model="apacheBackend" type="checkbox" value=""> {% if test_domain_data %}
Apache as Reverse Proxy (Beta, for Ubuntu 22 and AlmaLinux 8) <input ng-model="apacheBackend" type="checkbox" value="">
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22 and AlmaLinux 8)
{% else %}
<input ng-model="apacheBackend" type="checkbox" value="" disabled>
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22 and AlmaLinux 8) - <strong><a href="https://go.cyberpanel.net/ApacheRev">Premium Feature</a> <i class="p fa fa-external-link btn-icon"></i></strong>
{% endif %}
</label> </label>
</div> </div>
</div> </div>

View File

@@ -446,8 +446,10 @@ class WebsiteManager:
else: else:
return ACLManager.loadError() return ACLManager.loadError()
# php = VirtualHost.getPHPString(self.data['PHPVersion']) from managePHP.phpManager import PHPManager
# FinalPHPPath = '/usr/local/lsws/lsphp%s/bin/php' % (php)
php = PHPManager.getPHPString(WPobj.owner.phpSelection)
FinalPHPPath = '/usr/local/lsws/lsphp%s/bin/php' % (php)
url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission" url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission"
data = { data = {
@@ -465,11 +467,11 @@ class WebsiteManager:
password = randomPassword.generate_pass(10) password = randomPassword.generate_pass(10)
command = 'sudo -u %s wp user create autologin %s --role=administrator --user_pass="%s" --path=%s --skip-plugins --skip-themes' % ( command = f'sudo -u %s {FinalPHPPath} /usr/bin/wp user create autologin %s --role=administrator --user_pass="%s" --path=%s --skip-plugins --skip-themes' % (
WPobj.owner.externalApp, 'autologin@cloudpages.cloud', password, WPobj.path) WPobj.owner.externalApp, 'autologin@cloudpages.cloud', password, WPobj.path)
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
command = 'sudo -u %s wp user update autologin --user_pass="%s" --path=%s --skip-plugins --skip-themes' % ( command = f'sudo -u %s {FinalPHPPath} /usr/bin/wp user update autologin --user_pass="%s" --path=%s --skip-plugins --skip-themes' % (
WPobj.owner.externalApp, password, WPobj.path) WPobj.owner.externalApp, password, WPobj.path)
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
@@ -2063,6 +2065,7 @@ class WebsiteManager:
extraArgs['websiteOwner'] = data['websiteOwner'] extraArgs['websiteOwner'] = data['websiteOwner']
extraArgs['package'] = data['package'] extraArgs['package'] = data['package']
extraArgs['home'] = data['home'] extraArgs['home'] = data['home']
extraArgs['apacheBackend'] = data['apacheBackend']
try: try:
extraArgs['path'] = data['path'] extraArgs['path'] = data['path']
if extraArgs['path'] == '': if extraArgs['path'] == '':
@@ -2382,7 +2385,10 @@ class WebsiteManager:
for web in websites: for web in websites:
for child in web.childdomains_set.all(): for child in web.childdomains_set.all():
childDomains.append(child) if child.domain == f'mail.{web.domain}':
pass
else:
childDomains.append(child)
pagination = self.getPagination(len(childDomains), recordsToShow) pagination = self.getPagination(len(childDomains), recordsToShow)
json_data = self.findChildsListJson(childDomains[finalPageNumber:endPageNumber]) json_data = self.findChildsListJson(childDomains[finalPageNumber:endPageNumber])
@@ -6442,7 +6448,12 @@ StrictHostKeyChecking no
phps = PHPManager.findPHPVersions() phps = PHPManager.findPHPVersions()
proc = httpProc(request, 'websiteFunctions/ApacheManager.html', {'domainName': self.domain, 'phps': phps}) if ACLManager.CheckForPremFeature('all'):
apachemanager = 1
else:
apachemanager = 0
proc = httpProc(request, 'websiteFunctions/ApacheManager.html', {'domainName': self.domain, 'phps': phps, 'apachemanager':apachemanager})
return proc.render() return proc.render()
def saveApacheConfigsToFile(self, userID=None, data=None): def saveApacheConfigsToFile(self, userID=None, data=None):