From a7b132e23f2461b923e41e642955cd6e62b67a47 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 5 Mar 2019 14:50:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=AB=99=E5=88=A0=E9=99=A4=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/site_api.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 60f43e9fc..5a816d761 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -1660,16 +1660,22 @@ location /{ def deleteWSLogs(self, webname): assLogPath = public.getLogsDir() + '/' + webname + '.log' errLogPath = public.getLogsDir() + '/' + webname + '.error.log' - confFile = self.setupPath + '/web_conf/nginx/conf/vhost/' + webname + '.conf' - rewriteFile = self.setupPath + '/web_conf/nginx/conf/rewrite/' + webname + '.conf' - logs = [assLogPath, errLogPath, confFile, rewriteFile] + confFile = self.setupPath + '/nginx/vhost/' + webname + '.conf' + rewriteFile = self.setupPath + '/nginx/rewrite/' + webname + '.conf' + rewriteFile = self.setupPath + '/nginx/pass/' + webname + '.conf' + keyPath = self.sslDir + webname + '/privkey.pem' + certPath = self.sslDir + webname + '/fullchain.pem' + logs = [assLogPath, + errLogPath, + confFile, + rewriteFile, + keyPath, + certPath] for i in logs: public.deleteFile(i) def delete(self, sid, webname, path): - self.deleteWSLogs(webname) - if path == '1': rootPath = public.getWwwDir() + '/' + webname public.execShell('rm -rf ' + rootPath) @@ -1727,7 +1733,7 @@ location /{ self.saveCert(keyPath, certPath) msg = public.getInfo('网站[{1}]开启SSL成功!', siteName) - public.writeLog('TYPE_SITE', msg) + public.writeLog('网站管理', msg) return public.returnData(True, 'SSL开启成功!') def saveCert(self, keyPath, certPath):