From 6cee4bfe7ca7b0f1e68bb851f181a1d654cabce7 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 18 Apr 2023 23:27:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E4=BC=AA=E9=9D=99?= =?UTF-8?q?=E6=80=81=E9=85=8D=E7=BD=AE=E5=AD=98=E5=82=A8=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=20(#703)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/website.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/service/website.go b/backend/app/service/website.go index 7f559e8be..807063731 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -999,7 +999,7 @@ func (w WebsiteService) UpdateRewriteConfig(req request.NginxRewriteUpdate) erro if err != nil { return err } - includePath := fmt.Sprintf("/www/sites/%s/rewrite/%s.conf", website.PrimaryDomain, website.PrimaryDomain) + includePath := fmt.Sprintf("/www/sites/%s/rewrite/%s.conf", website.Alias, website.PrimaryDomain) absolutePath := path.Join(nginxFull.Install.GetPath(), includePath) fileOp := files.NewFileOp() var oldRewriteContent []byte @@ -1041,7 +1041,7 @@ func (w WebsiteService) GetRewriteConfig(req request.NginxRewriteReq) (*response if err != nil { return nil, err } - rewriteConfPath := path.Join(nginxInstall.GetPath(), "www", "sites", website.PrimaryDomain, "rewrite", fmt.Sprintf("%s.conf", website.PrimaryDomain)) + rewriteConfPath := path.Join(nginxInstall.GetPath(), "www", "sites", website.Alias, "rewrite", fmt.Sprintf("%s.conf", website.PrimaryDomain)) fileOp := files.NewFileOp() if fileOp.Stat(rewriteConfPath) { contentByte, err = fileOp.GetContent(rewriteConfPath) @@ -1087,7 +1087,7 @@ func (w WebsiteService) UpdateSitePermission(req request.WebsiteUpdateDirPermiss if err != nil { return err } - absoluteIndexPath := path.Join(nginxInstall.GetPath(), "www", "sites", website.PrimaryDomain, "index") + absoluteIndexPath := path.Join(nginxInstall.GetPath(), "www", "sites", website.Alias, "index") if website.SiteDir != "/" { absoluteIndexPath = path.Join(absoluteIndexPath, website.SiteDir) }