mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
feat: 默认网站日志开启
This commit is contained in:
parent
cb90cd1a10
commit
62e806b1ba
@ -119,6 +119,8 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) error {
|
|||||||
WebsiteGroupID: create.WebsiteGroupID,
|
WebsiteGroupID: create.WebsiteGroupID,
|
||||||
Protocol: constant.ProtocolHTTP,
|
Protocol: constant.ProtocolHTTP,
|
||||||
Proxy: create.Proxy,
|
Proxy: create.Proxy,
|
||||||
|
AccessLog: true,
|
||||||
|
ErrorLog: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
tx, ctx := getTxAndContext()
|
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 {
|
if err := deleteListenAndServerName(website, []int{443}, []string{}); err != nil {
|
||||||
return response.WebsiteHTTPS{}, err
|
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
|
return response.WebsiteHTTPS{}, err
|
||||||
}
|
}
|
||||||
if err := websiteRepo.Save(ctx, &website); err != nil {
|
if err := websiteRepo.Save(ctx, &website); err != nil {
|
||||||
|
@ -167,6 +167,7 @@ export namespace Website {
|
|||||||
issuerName: string;
|
issuerName: string;
|
||||||
expireDate: string;
|
expireDate: string;
|
||||||
startDate: string;
|
startDate: string;
|
||||||
|
provider: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SSLCreate {
|
export interface SSLCreate {
|
||||||
|
@ -998,6 +998,7 @@ export default {
|
|||||||
key: '私钥',
|
key: '私钥',
|
||||||
startDate: '生效时间',
|
startDate: '生效时间',
|
||||||
organization: '签发机构',
|
organization: '签发机构',
|
||||||
|
renewConfirm: '是否确定续签?',
|
||||||
},
|
},
|
||||||
firewall: {
|
firewall: {
|
||||||
ccDeny: 'CC 防护',
|
ccDeny: 'CC 防护',
|
||||||
|
@ -101,6 +101,9 @@ const buttons = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: i18n.global.t('website.renewSSL'),
|
label: i18n.global.t('website.renewSSL'),
|
||||||
|
disabled: function (row: Website.SSL) {
|
||||||
|
return row.provider === 'manual';
|
||||||
|
},
|
||||||
click: function (row: Website.SSL) {
|
click: function (row: Website.SSL) {
|
||||||
openRenewSSL(row.id);
|
openRenewSSL(row.id);
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<span>是否确定续签?</span>
|
<span>{{ $t('ssl.renewConfirm') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user