diff --git a/backend/app/service/website.go b/backend/app/service/website.go index 8dc80902c..8d486e182 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -119,6 +119,8 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) error { WebsiteGroupID: create.WebsiteGroupID, Protocol: constant.ProtocolHTTP, Proxy: create.Proxy, + AccessLog: true, + ErrorLog: true, } tx, ctx := getTxAndContext() @@ -545,7 +547,9 @@ func (w WebsiteService) OpWebsiteHTTPS(ctx context.Context, req request.WebsiteH if err := deleteListenAndServerName(website, []int{443}, []string{}); err != nil { return response.WebsiteHTTPS{}, err } - if err := deleteNginxConfig(constant.NginxScopeServer, getKeysFromStaticFile(dto.SSL), &website); err != nil { + keys := getKeysFromStaticFile(dto.SSL) + keys = append(keys, "if") + if err := deleteNginxConfig(constant.NginxScopeServer, keys, &website); err != nil { return response.WebsiteHTTPS{}, err } if err := websiteRepo.Save(ctx, &website); err != nil { diff --git a/frontend/src/api/interface/website.ts b/frontend/src/api/interface/website.ts index d44a8c091..429d7e448 100644 --- a/frontend/src/api/interface/website.ts +++ b/frontend/src/api/interface/website.ts @@ -167,6 +167,7 @@ export namespace Website { issuerName: string; expireDate: string; startDate: string; + provider: string; } export interface SSLCreate { diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 5d4214f3a..48b7532ed 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -998,6 +998,7 @@ export default { key: '私钥', startDate: '生效时间', organization: '签发机构', + renewConfirm: '是否确定续签?', }, firewall: { ccDeny: 'CC 防护', diff --git a/frontend/src/views/website/ssl/index.vue b/frontend/src/views/website/ssl/index.vue index c19d0d801..2c02170e3 100644 --- a/frontend/src/views/website/ssl/index.vue +++ b/frontend/src/views/website/ssl/index.vue @@ -101,6 +101,9 @@ const buttons = [ }, { label: i18n.global.t('website.renewSSL'), + disabled: function (row: Website.SSL) { + return row.provider === 'manual'; + }, click: function (row: Website.SSL) { openRenewSSL(row.id); }, diff --git a/frontend/src/views/website/ssl/renew/index.vue b/frontend/src/views/website/ssl/renew/index.vue index 35b7ebc40..607ac6360 100644 --- a/frontend/src/views/website/ssl/renew/index.vue +++ b/frontend/src/views/website/ssl/renew/index.vue @@ -8,7 +8,7 @@ :before-close="handleClose" >