diff --git a/web/utils/site.py b/web/utils/site.py index 75bdb9338..57beecb44 100644 --- a/web/utils/site.py +++ b/web/utils/site.py @@ -976,17 +976,15 @@ class sites(object): site_path = info['path'] new_path = site_path + run_path - # 处理Nginx site_host = self.getHostConf(site_name) if os.path.exists(site_host): content = mw.readFile(site_host) rep = r'\s*root\s*(.+);' path = re.search(rep, content).groups()[0] - content = conf.replace(path, new_path) + content = content.replace(path, new_path) mw.writeFile(site_host, content) - self.setSitePath(site_id, run_path) mw.restartWeb() return mw.returnData(True, '设置成功!')