mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-12 00:16:37 +08:00
fix: 修改index页面
This commit is contained in:
parent
1034188f40
commit
b4254e3403
3 changed files with 4 additions and 4 deletions
|
@ -218,7 +218,6 @@ func (w WebsiteService) Recover(req request.WebsiteRecover) error {
|
||||||
}
|
}
|
||||||
fileDir := path.Dir(req.BackupName)
|
fileDir := path.Dir(req.BackupName)
|
||||||
pathName := strings.ReplaceAll(path.Base(req.BackupName), ".tar.gz", "")
|
pathName := strings.ReplaceAll(path.Base(req.BackupName), ".tar.gz", "")
|
||||||
//fileName := strings.ReplaceAll(req.BackupName[strings.LastIndex(req.BackupName, "/"):], ".tar.gz", "")
|
|
||||||
if err := handleUnTar(req.BackupName, fileDir); err != nil {
|
if err := handleUnTar(req.BackupName, fileDir); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ func createStaticHtml(website *model.Website) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
indexFolder := path.Join(constant.AppInstallDir, constant.AppNginx, nginxInstall.Name, "www", "sites", website.Alias)
|
indexFolder := path.Join(constant.AppInstallDir, constant.AppNginx, nginxInstall.Name, "www", "sites", website.Alias, "index")
|
||||||
indexPath := path.Join(indexFolder, "index.html")
|
indexPath := path.Join(indexFolder, "index.html")
|
||||||
indexContent := string(nginx_conf.Index)
|
indexContent := string(nginx_conf.Index)
|
||||||
fileOp := files.NewFileOp()
|
fileOp := files.NewFileOp()
|
||||||
|
@ -87,7 +87,7 @@ func createWebsiteFolder(nginxInstall model.AppInstall, website *model.Website)
|
||||||
if err := fileOp.CreateFile(path.Join(siteFolder, "log", "access.log")); err != nil {
|
if err := fileOp.CreateFile(path.Join(siteFolder, "log", "access.log")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := fileOp.CreateDir(path.Join(siteFolder, "data"), 0755); err != nil {
|
if err := fileOp.CreateDir(path.Join(siteFolder, "index"), 0755); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := fileOp.CreateDir(path.Join(siteFolder, "ssl"), 0755); err != nil {
|
if err := fileOp.CreateDir(path.Join(siteFolder, "ssl"), 0755); err != nil {
|
||||||
|
@ -139,7 +139,7 @@ func configDefaultNginx(website *model.Website, domains []model.WebsiteDomain, a
|
||||||
proxy := fmt.Sprintf("http://127.0.0.1:%d", appInstall.HttpPort)
|
proxy := fmt.Sprintf("http://127.0.0.1:%d", appInstall.HttpPort)
|
||||||
server.UpdateRootProxy([]string{proxy})
|
server.UpdateRootProxy([]string{proxy})
|
||||||
case constant.Static:
|
case constant.Static:
|
||||||
server.UpdateRoot(path.Join("/www/sites", website.Alias))
|
server.UpdateRoot(path.Join("/www/sites", website.Alias, "index"))
|
||||||
server.UpdateRootLocation()
|
server.UpdateRootLocation()
|
||||||
case constant.Proxy:
|
case constant.Proxy:
|
||||||
server.UpdateRootProxy([]string{website.Proxy})
|
server.UpdateRootProxy([]string{website.Proxy})
|
||||||
|
|
|
@ -112,6 +112,7 @@
|
||||||
<div>
|
<div>
|
||||||
<span class="input-help">
|
<span class="input-help">
|
||||||
{{ $t('website.staticPath') + staticPath + '/' + website.alias }}
|
{{ $t('website.staticPath') + staticPath + '/' + website.alias }}
|
||||||
|
<span v-if="website.type === 'static' && website.alias != ''">{{ '/index' }}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
Loading…
Add table
Reference in a new issue