mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 解决取消HTTPS报错的BUG
This commit is contained in:
parent
b66108ab4a
commit
1f717bea0e
@ -364,6 +364,11 @@ func (w WebsiteService) OpWebsiteHTTPS(req dto.WebsiteHTTPSOp) (dto.WebsiteHTTPS
|
||||
} else {
|
||||
website.Protocol = constant.ProtocolHTTP
|
||||
website.WebSiteSSLID = 0
|
||||
|
||||
if err := deleteListenAndServerName(website, []int{443}, []string{}); err != nil {
|
||||
return dto.WebsiteHTTPS{}, err
|
||||
}
|
||||
|
||||
if err := deleteNginxConfig(website, getKeysFromStaticFile(dto.SSL)); err != nil {
|
||||
return dto.WebsiteHTTPS{}, err
|
||||
}
|
||||
|
@ -404,7 +404,7 @@ func applySSL(website model.WebSite, websiteSSL model.WebSiteSSL) error {
|
||||
}
|
||||
config := nginxConfig.Config
|
||||
server := config.FindServers()[0]
|
||||
server.UpdateListen("443", false)
|
||||
server.UpdateListen("443", false, "ssl")
|
||||
if err := nginx.WriteConfig(config, nginx.IndentedStyle); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user