1. Add disk IO information to the homepage
2. Add a clear list button in the upload window
3. Optimize the background task overhead of the panel
4. Optimize the disk information caching mechanism
5. Panel Pro edition is online
6. Optimize panel resource usage
7. Optimize SSL certificate renewal
8. Fix the problem of reporting an error when the security entrance is empty
9. Fix the problem of infinite recursion when copying directories in extreme cases
This commit is contained in:
jose
2021-06-11 11:50:57 +08:00
parent aacc0df179
commit 3ac20e08ce
93 changed files with 11684 additions and 7756 deletions
+20
View File
@@ -246,10 +246,30 @@ class apache:
return public.returnMsg(False, 'CONF_FILE_NOT_EXISTS')
reg = '\s*#LOG_FORMAT_BEGIN_{n}(\n|.)+#LOG_FORMAT_END_{n}\n?'.format(n=args.log_format_name)
conf = re.sub(reg,'',conf)
self._del_format_log_of_website(args.log_format_name)
public.writeFile(self.httpdconf,conf)
public.serviceReload()
return public.returnMsg(True, 'SET_SUCCESS')
def _del_format_log_of_website(self,log_format_name):
site_format_log_status = self._get_format_log_to_website(log_format_name)
try:
for s in site_format_log_status.keys():
if not site_format_log_status[s]:
continue
website_conf_file = '/www/server/panel/vhost/apache/{}.conf'.format(s)
format_exist_reg = 'CustomLog\s+"/www.*"\s+{}'.format(log_format_name)
conf = public.readFile(website_conf_file)
if not conf:continue
if not re.search(format_exist_reg,conf):continue
access_log = re.search(format_exist_reg,conf).group().split()
access_log = access_log[0] + ' ' +access_log[1] + 'combined'
conf = re.sub(format_exist_reg,access_log,conf)
public.writeFile(website_conf_file,conf)
return True
except:
return False
def get_httpd_access_log_format_parameter(self,args=None):
data = {
"%h":"Client's IP address",