From ba92a8151ef2cad82e140cba08efc52ac129c845 Mon Sep 17 00:00:00 2001 From: jakub961241 <144362244+jakub961241@users.noreply.github.com> Date: Sun, 22 Mar 2026 00:50:26 +0100 Subject: [PATCH] feat: unify default server with default page options (#12179) Merge "Default Page" configuration into the "Default Server" dialog. Users can now choose between: - No default server - Default Page (with sub-options: Custom HTML, No Response 444, Redirect) - An existing website The "No Response (444)" option is useful for security when ports are scanned. The "Redirect" option allows redirecting unbound domains to a specific URL. The separate "Default HTML" button is kept for editing PHP, domain404, and stop pages which serve different purposes. Closes #12179 --- frontend/src/lang/modules/en.ts | 7 + frontend/src/lang/modules/zh.ts | 7 + .../views/website/website/default/index.vue | 160 +++++++++++++++--- 3 files changed, 154 insertions(+), 20 deletions(-) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 1b235bb83d83..a560374770b1 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -2668,6 +2668,13 @@ const message = { noDefaultServer: 'Not set', defaultServerHelper: 'After setting the default site, all unbinded domain names and IPs will be redirected to the default site\nThis can effectively prevent malicious resolution\nHowever, it will also cause the WAF unauthorized domain name interception to fail', + defaultPage: 'Default Page', + defaultPageType: 'Default Page Type', + customHtml: 'Custom HTML', + noResponse: 'No Response (444)', + noResponseHelper: 'Returns no response to the client. More secure when ports are scanned, as it reveals no server information.', + redirectTo: 'Redirect', + redirectUrl: 'Redirect URL', restoreHelper: 'Are you sure to restore using this backup?', websiteDeploymentHelper: 'Use an installed application or create a new application to create a website.', websiteStatictHelper: 'Create a website directory on the host.', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 1125086779d7..d44b6bbdbb81 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -2473,6 +2473,13 @@ const message = { noDefaultServer: '未设置', defaultServerHelper: '设置默认站点后,所有未绑定的域名和IP都被定向到默认站点\n可有效防止恶意解析\n但同时会导致 WAF 未授权域名拦截失败', + defaultPage: '默认页', + defaultPageType: '默认页类型', + customHtml: '自定义 HTML', + noResponse: '不响应 (444)', + noResponseHelper: '不响应客户端请求。端口被扫描时更安全,不会暴露服务器信息。', + redirectTo: '跳转', + redirectUrl: '跳转地址', websiteDeploymentHelper: '使用从 1Panel 部署的应用创建网站', websiteStatictHelper: '在主机上创建网站目录', websiteProxyHelper: diff --git a/frontend/src/views/website/website/default/index.vue b/frontend/src/views/website/website/default/index.vue index 56909fff53e1..bf56dda553d7 100644 --- a/frontend/src/views/website/website/default/index.vue +++ b/frontend/src/views/website/website/default/index.vue @@ -2,22 +2,53 @@ - - + + + + /> + + - + + + + +