@@ -225,9 +225,8 @@ func configDefaultNginx(website *model.Website, domains []model.WebsiteDomain, a
225225 server .UpdateRoot (rootIndex )
226226 server .UpdatePHPProxy ([]string {website .Proxy }, "" )
227227 }
228- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo :
229- proxy := fmt .Sprintf ("http://127.0.0.1:%d" , runtime .Port )
230- server .UpdateRootProxy ([]string {proxy })
228+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant .RuntimeDotNet :
229+ server .UpdateRootProxy ([]string {fmt .Sprintf ("http://%s" , website .Proxy )})
231230 }
232231 case constant .Subsite :
233232 parentWebsite , err := websiteRepo .GetFirst (repo .WithByID (website .ParentWebsiteID ))
@@ -760,14 +759,13 @@ func toMapStr(m map[string]interface{}) map[string]string {
760759 return ret
761760}
762761
763- func deleteWebsiteFolder (nginxInstall model.AppInstall , website * model.Website ) error {
764- nginxFolder := path .Join (global .Dir .AppInstallDir , constant .AppOpenresty , nginxInstall .Name )
765- siteFolder := path .Join (nginxFolder , "www" , "sites" , website .Alias )
762+ func deleteWebsiteFolder (website * model.Website ) error {
763+ siteFolder := GetSitePath (* website , SiteDir )
766764 fileOp := files .NewFileOp ()
767765 if fileOp .Stat (siteFolder ) {
768766 _ = fileOp .DeleteDir (siteFolder )
769767 }
770- nginxFilePath := path . Join ( nginxFolder , "conf" , "conf.d" , website . PrimaryDomain + ".conf" )
768+ nginxFilePath := GetSitePath ( * website , SiteConf )
771769 if fileOp .Stat (nginxFilePath ) {
772770 _ = fileOp .DeleteFile (nginxFilePath )
773771 }
0 commit comments