mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-06 05:24:33 +08:00
fix: 解决低版本 OpenResty 创建网站报错的问题 (#4661)
This commit is contained in:
parent
dcc0264b67
commit
b6b4bfe195
1 changed files with 7 additions and 0 deletions
|
@ -288,6 +288,10 @@ func createWafConfig(website *model.Website, domains []model.WebsiteDomain) erro
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !common.CompareVersion(nginxInstall.Version, "1.21.4.3-2-0") {
|
||||
return nil
|
||||
}
|
||||
wafDataPath := path.Join(nginxInstall.GetPath(), "1pwaf", "data")
|
||||
fileOp := files.NewFileOp()
|
||||
if !fileOp.Stat(wafDataPath) {
|
||||
|
@ -419,6 +423,9 @@ func delWafConfig(website model.Website, force bool) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !common.CompareVersion(nginxInstall.Version, "1.21.4.3-2-0") {
|
||||
return nil
|
||||
}
|
||||
wafDataPath := path.Join(nginxInstall.GetPath(), "1pwaf", "data")
|
||||
fileOp := files.NewFileOp()
|
||||
if !fileOp.Stat(wafDataPath) {
|
||||
|
|
Loading…
Add table
Reference in a new issue