fix: 解决网站某些设置会报服务器内部错误的问题 (#2973)

Refs https://github.com/1Panel-dev/1Panel/issues/2955
pull/2980/head
zhengkunwang 1 year ago committed by GitHub
parent 49d8582658
commit 88c3559245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -196,8 +196,11 @@ func opNginx(containerName, operate string) error {
if operate == constant.NginxCheck {
nginxCmd = fmt.Sprintf("docker exec -i %s %s", containerName, "nginx -t")
}
if out, err := cmd.ExecWithTimeOut(nginxCmd, 2*time.Second); err != nil {
return errors.New(out)
if out, err := cmd.ExecWithTimeOut(nginxCmd, 20*time.Second); err != nil {
if out != "" {
return errors.New(out)
}
return err
}
return nil
}

Loading…
Cancel
Save