mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 15:06:37 +08:00
fix: fix issue with re-enable the website failed (#8731)
This commit is contained in:
parent
8e5e0b0d88
commit
1735baf657
1 changed files with 3 additions and 3 deletions
|
@ -886,14 +886,14 @@ func opWebsite(website *model.Website, operate string) error {
|
|||
website.Status = constant.WebStopped
|
||||
}
|
||||
if operate == constant.StartWeb {
|
||||
absoluteIncludeDir := path.Join(nginxInstall.Install.GetPath(), fmt.Sprintf("/www/sites/%s/proxy", website.Alias))
|
||||
absoluteIncludeDir := GetSitePath(*website, SiteProxyDir)
|
||||
fileOp := files.NewFileOp()
|
||||
if fileOp.Stat(absoluteIncludeDir) && !files.IsEmptyDir(absoluteIncludeDir) {
|
||||
proxyInclude := fmt.Sprintf("/www/sites/%s/proxy/*.conf", website.Alias)
|
||||
server.UpdateDirective("include", []string{proxyInclude})
|
||||
}
|
||||
rewriteInclude := fmt.Sprintf("/www/sites/%s/rewrite/%s.conf", website.Alias, website.Alias)
|
||||
absoluteRewritePath := path.Join(nginxInstall.Install.GetPath(), rewriteInclude)
|
||||
absoluteRewritePath := GetSitePath(*website, SiteReWritePath)
|
||||
if fileOp.Stat(absoluteRewritePath) {
|
||||
server.UpdateDirective("include", []string{rewriteInclude})
|
||||
}
|
||||
|
@ -924,7 +924,7 @@ func opWebsite(website *model.Website, operate string) error {
|
|||
}
|
||||
if runtime.Type == constant.RuntimePHP {
|
||||
if website.ProxyType == constant.RuntimeProxyUnix || website.ProxyType == constant.RuntimeProxyTcp {
|
||||
localPath = path.Join(nginxInstall.Install.GetPath(), rootIndex, "index.php")
|
||||
localPath = path.Join(GetSitePath(*website, SiteIndexDir), "index.php")
|
||||
}
|
||||
server.UpdatePHPProxy([]string{website.Proxy}, localPath)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue