Update site.py

pull/674/head
Mr Chen 5 months ago
parent 4561e37167
commit a1489959d1
  1. 4
      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, '设置成功!')

Loading…
Cancel
Save