From 481831d896859a8b0f9faed5a70b28294d59582e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Mon, 26 Jan 2026 03:12:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vitepress/config/en.ts | 179 +++++- en/advanced/{safe.md => security.md} | 0 en/faq/application.md | 11 + en/faq/container.md | 32 ++ en/faq/database.md | 1 + en/faq/panel.md | 71 +++ en/faq/project.md | 1 + en/{advanced/faq.md => faq/website.md} | 53 +- en/quickstart/cli.md | 46 ++ en/quickstart/container.md | 25 - en/quickstart/first-container.md | 42 ++ en/quickstart/first-project.md | 0 en/quickstart/first-website.md | 48 ++ en/quickstart/install.md | 20 +- en/quickstart/introduction.md | 38 ++ en/quickstart/news/acepanel-3-release.md | 166 ++++++ en/quickstart/panel.md | 35 -- en/quickstart/uninstall.md | 7 + en/quickstart/upgrade.md | 31 ++ zh_CN/about.md | 72 --- zh_CN/advanced/api.md | 661 ----------------------- zh_CN/advanced/faq.md | 80 --- zh_CN/advanced/safe.md | 32 -- zh_CN/cert.md | 202 ------- zh_CN/index.md | 62 --- zh_CN/quickstart/container.md | 25 - zh_CN/quickstart/disk.md | 9 - zh_CN/quickstart/install.md | 38 -- zh_CN/quickstart/panel.md | 35 -- zh_CN/support.md | 37 -- zh_CN/version-[version].md | 8 - zh_CN/version-[version].paths.ts | 17 - zh_TW/about.md | 73 --- zh_TW/advanced/api.md | 661 ----------------------- zh_TW/advanced/faq.md | 80 --- zh_TW/advanced/safe.md | 32 -- zh_TW/cert.md | 202 ------- zh_TW/index.md | 62 --- zh_TW/quickstart/container.md | 25 - zh_TW/quickstart/disk.md | 9 - zh_TW/quickstart/install.md | 44 -- zh_TW/quickstart/panel.md | 35 -- zh_TW/support.md | 37 -- zh_TW/version-[version].md | 8 - zh_TW/version-[version].paths.ts | 17 - 45 files changed, 675 insertions(+), 2694 deletions(-) rename en/advanced/{safe.md => security.md} (100%) create mode 100644 en/faq/application.md create mode 100644 en/faq/container.md create mode 100644 en/faq/database.md create mode 100644 en/faq/panel.md create mode 100644 en/faq/project.md rename en/{advanced/faq.md => faq/website.md} (50%) create mode 100644 en/quickstart/cli.md delete mode 100644 en/quickstart/container.md create mode 100644 en/quickstart/first-container.md create mode 100644 en/quickstart/first-project.md create mode 100644 en/quickstart/first-website.md create mode 100644 en/quickstart/introduction.md create mode 100644 en/quickstart/news/acepanel-3-release.md delete mode 100644 en/quickstart/panel.md create mode 100644 en/quickstart/uninstall.md create mode 100644 en/quickstart/upgrade.md delete mode 100644 zh_CN/about.md delete mode 100644 zh_CN/advanced/api.md delete mode 100644 zh_CN/advanced/faq.md delete mode 100644 zh_CN/advanced/safe.md delete mode 100644 zh_CN/cert.md delete mode 100644 zh_CN/index.md delete mode 100644 zh_CN/quickstart/container.md delete mode 100644 zh_CN/quickstart/disk.md delete mode 100644 zh_CN/quickstart/install.md delete mode 100644 zh_CN/quickstart/panel.md delete mode 100644 zh_CN/support.md delete mode 100644 zh_CN/version-[version].md delete mode 100644 zh_CN/version-[version].paths.ts delete mode 100644 zh_TW/about.md delete mode 100644 zh_TW/advanced/api.md delete mode 100644 zh_TW/advanced/faq.md delete mode 100644 zh_TW/advanced/safe.md delete mode 100644 zh_TW/cert.md delete mode 100644 zh_TW/index.md delete mode 100644 zh_TW/quickstart/container.md delete mode 100644 zh_TW/quickstart/disk.md delete mode 100644 zh_TW/quickstart/install.md delete mode 100644 zh_TW/quickstart/panel.md delete mode 100644 zh_TW/support.md delete mode 100644 zh_TW/version-[version].md delete mode 100644 zh_TW/version-[version].paths.ts diff --git a/.vitepress/config/en.ts b/.vitepress/config/en.ts index 33a7b1c..195edc3 100644 --- a/.vitepress/config/en.ts +++ b/.vitepress/config/en.ts @@ -23,9 +23,16 @@ export const config = defineConfig({ }, { text: "Advanced", + collapsed: true, base: locale == 'zh_CN' ? '/advanced' : `/${locale}/advanced`, items: sidebarAdvanced() }, + { + text: "FAQ", + collapsed: true, + base: locale == 'zh_CN' ? '/faq' : `/${locale}/faq`, + items: sidebarFAQ() + }, { text: "Versions", collapsed: true, @@ -100,37 +107,187 @@ function nav(): DefaultTheme.NavItem[] { function sidebarQuickstart(): DefaultTheme.SidebarItem[] { return [ { - text: 'Installing panel', + text: '动态与公告', + collapsed: true, + items: [ + { text: "AcePanel 3.0 正式发布", link: '/news/acepanel-3-release' }, + ] + }, + { + text: 'Introduction', + link: '/introduction' + }, + { + text: 'Install', link: '/install' }, { - text: 'Mounting partition', - link: '/disk' + text: 'Upgrade', + link: '/upgrade' }, { - text: 'Managing panel', - link: '/panel' + text: '第一个网站', + link: '/first-website' }, { - text: 'Managing container', - link: '/container' + text: '第一个容器', + link: '/first-container' }, + { + text: '第一个项目', + link: '/first-project' + }, + { + text: 'Command Line', + link: '/cli' + }, + { + text: 'Uninstall', + link: '/uninstall' + } ] } function sidebarAdvanced(): DefaultTheme.SidebarItem[] { return [ + { + text: 'Security recommendations', + link: '/security' + }, + { + text: "应用", + collapsed: true, + items: [ + { text: "概述", link: '/app' }, + { text: "原生应用", link: '/app/native' }, + { text: "运行环境", link: '/app/environment' }, + { text: "容器模版", link: '/app/template' } + ] + }, + { + text: "容器", + collapsed: true, + items: [ + { text: "概述", link: '/container' }, + { text: "容器", link: '/container/container' }, + { text: "编排", link: '/container/compose' }, + { text: "镜像", link: '/container/image' }, + { text: "网络", link: '/container/network' }, + { text: "卷", link: '/container/volume' } + ] + }, + { + text: "网站", + collapsed: true, + items: [ + { text: "概述", link: '/website' }, + { text: "反向代理", link: '/website/proxy' }, + { text: "PHP", link: '/website/php' }, + { text: "纯静态", link: '/website/static' } + ] + }, { + text: "项目", + collapsed: true, + items: [ + { text: "概述", link: '/project' }, + { text: "Go", link: '/project/go' }, + { text: "Java", link: '/project/java' }, + { text: "Node.js", link: '/project/nodejs' }, + { text: "PHP", link: '/project/php' }, + { text: "Python", link: '/project/python' }, + { text: "通用", link: '/project/general' } + ] + }, { + text: "数据库", + collapsed: true, + items: [ + { text: "概述", link: '/database' }, + { text: "数据库", link: '/database/database' }, + { text: "用户", link: '/database/user' }, + { text: "服务器", link: '/database/server' } + ] + },{ + text: "证书", + collapsed: true, + items: [ + { text: "概述", link: '/cert' }, + { text: "证书", link: '/cert/cert' }, + { text: "账号", link: '/cert/account' }, + { text: "DNS", link: '/cert/dns' } + ] + }, { + text: "监控", + link: '/monitor' + }, { + text: "文件", + link: '/file' + }, { + text: "备份", + link: '/backup' + }, { + text: "终端", + link: '/ssh' + }, { + text: "任务", + collapsed: true, + items: [ + { text: "计划任务", link: '/task/schedule' }, + { text: "面板任务", link: '/task/panel' } + ] + }, { + text: "工具箱", + collapsed: true, + items: [ + { text: "概述", link: '/toolbox' }, + { text: "进程", link: '/toolbox/process' }, + { text: "系统", link: '/toolbox/system' }, + { text: "SSH", link: '/toolbox/ssh' }, + { text: "磁盘", link: '/toolbox/disk' }, + { text: "日志清理", link: '/toolbox/log' }, + { text: "Web 钩子", link: '/toolbox/webhook' }, + { text: "跑分", link: '/toolbox/benchmark' } + ] + }, { + text: "设置", + collapsed: true, + items: [ + { text: "基本设置", link: '/setting/basic' }, + { text: "安全设置", link: '/setting/safe' }, + { text: "用户设置", link: '/setting/user' } + ] + }, { text: 'Panel API', link: '/api' }, + ] +} + +function sidebarFAQ(): DefaultTheme.SidebarItem[] { + return [ { - text: 'Security recommendations', - link: '/safe' + text: "Panel FAQs", + link: '/panel' }, { - text: 'FAQ', - link: '/faq' + text: "Application FAQs", + link: '/application' + }, + { + text: "Database FAQs", + link: '/database' + }, + { + text: "Website FAQs", + link: '/website' + }, + { + text: "Project FAQs", + link: '/project' + }, + { + text: "Container FAQs", + link: '/container' }, ] } diff --git a/en/advanced/safe.md b/en/advanced/security.md similarity index 100% rename from en/advanced/safe.md rename to en/advanced/security.md diff --git a/en/faq/application.md b/en/faq/application.md new file mode 100644 index 0000000..365941d --- /dev/null +++ b/en/faq/application.md @@ -0,0 +1,11 @@ +## Supervisor 常见问题 + +> 启动项目报错`run supervisorctl start xxx failed`,日志中有`EACCES`之类信息 + +这是权限问题,项目建议部署在面板安装目录(/opt/ace)下,而不是/root,如果你执意要部署在/root,则需要使用root用户启动应用并自行承担可能的风险。 +如果已经移至安装目录下仍报错,请检查项目的所有者和用户组是否为www。 + +> 启动项目报错`run supervisorctl start xxx failed`,日志中有`'node': No such file or directory`或`'npm': No such file or directory`之类信息 + +如果你的Node.js是通过nvm之类的安装的(官方安装法),那么默认是找不到Node.js和npm的(没有链接到/usr/local/bin),这种情况下需要在Supervisor管理器编辑配置文件,末尾换行添加`environment=PATH="/root/.nvm/versions/node/版本/bin:/usr/local/bin:/usr/bin:/bin"`补充Node.js位置。 +Node.js具体位置和版本可以通过`whereis nodejs`查看。 diff --git a/en/faq/container.md b/en/faq/container.md new file mode 100644 index 0000000..bc86658 --- /dev/null +++ b/en/faq/container.md @@ -0,0 +1,32 @@ +## Configure Container Image Acceleration + +Due to certain reasons, domestic users in China may be unable to connect to Docker Hub to pull container images, thus requiring image acceleration configuration. + +### For Podman + +Open the Podman settings page in the Panel, and navigate to the Registry Configuration tab. + +Scroll to the bottom of the configuration file, add the following configuration and save: + +``` +[[registry]] +location = "docker.io" +[[registry.mirror]] +location = "docker.1ms.run" +``` + +Where docker.1ms.run is the configured image acceleration address. You can refer to other tutorials to set up and use it. + +### For Docker + +Open the Docker settings page in the Panel, and navigate to the Configuration tab. + +Add the following configuration and save: + +```json +{ + "registry-mirrors": ["https://docker.1ms.run"] +} +``` + +Where https://docker.1ms.run is the configured image acceleration address. You can refer to other tutorials to set up and use it. diff --git a/en/faq/database.md b/en/faq/database.md new file mode 100644 index 0000000..2d190bf --- /dev/null +++ b/en/faq/database.md @@ -0,0 +1 @@ +待补充完善 \ No newline at end of file diff --git a/en/faq/panel.md b/en/faq/panel.md new file mode 100644 index 0000000..9cb430c --- /dev/null +++ b/en/faq/panel.md @@ -0,0 +1,71 @@ +## 面板打不开了怎么办? + +不要慌,通常来说问题不大,按以下步骤操作即可: + +首先尝试 SSH 连接服务器,如果可以连接,进入下一步;如果无法连接,直接联系服务器提供商。 + +通过 SSH 登录服务器后,首先检查 AcePanel 服务状态,执行以下命令: + +```bash +acepanel status +``` + +如果提示服务已停止,尝试启动服务并再次检查状态: + +```bash +acepanel start && sleep 3 && acepanel status +``` + +如果服务无法启动,尝试修复面板并更新到最新版本: + +```bash +acepanel fix && acepanel update +``` + +如果服务已启动但仍无法访问面板,使用 curl 命令检查面板是否在监听端口: + +```bash +curl -I http://127.0.0.1: +``` + +将 `` 替换为您面板实际使用的端口号(默认 8888)。如果返回 HTTP 200/307 状态码,说明面板服务正常运行,可能是防火墙或网络问题导致无法访问。 + +检查防火墙设置,确保面板端口已开放: + +```bash +firewall-cmd --list-all +``` + +如果端口未开放,执行以下命令开放端口: + +```bash +firewall-cmd --add-port=/tcp --permanent +firewall-cmd --reload +``` + +服务器的安全组设置也可能阻止访问面板端口,请登录服务器提供商的控制台检查并确保面板端口已开放。 + +如果以上步骤均无法解决问题,建议查看面板日志获取更多信息或前往[社区发帖](https://tom.moe)联系支持获取帮助: + +```bash +journalctl -u acepanel -n 100 +cat /opt/ace/panel/storage/logs/app.log +``` + +## 无权限执行 `acepanel` 命令 + +`acepanel` 命令必须以 root 用户运行。如果当前用户没有足够权限,请切换到 root 用户或使用 sudo 执行命令,例如: + +```bash +sudo acepanel status +``` + +## 忘记面板管理员用户/密码/地址怎么办? + +最快最简单的方法是使用命令行工具重新获取管理员用户信息,执行以下命令: + +```bash +acepanel info +``` + +该命令会输出面板的基本信息,包括管理员用户名、登录地址以及生成一个新的随机密码。 diff --git a/en/faq/project.md b/en/faq/project.md new file mode 100644 index 0000000..2d190bf --- /dev/null +++ b/en/faq/project.md @@ -0,0 +1 @@ +待补充完善 \ No newline at end of file diff --git a/en/advanced/faq.md b/en/faq/website.md similarity index 50% rename from en/advanced/faq.md rename to en/faq/website.md index 5d97bba..dc7559e 100644 --- a/en/advanced/faq.md +++ b/en/faq/website.md @@ -1,7 +1,3 @@ -# Frequently Asked Questions - -Here are some common questions and answers about AcePanel. If you have any other questions, please feel free to ask in the [AcePanel Community](https://tom.moe/c/technical/acepanel). If you find any bugs, please submit a [GitHub Issue](https://github.com/acepanel/panel/issues). - ## Configure QUIC (HTTP3) AcePanel currently supports automatic QUIC configuration, but for compatibility reasons, the `Alt-Svc` header is not added by default. Browsers will not attempt to use QUIC connections without detecting the `Alt-Svc` header. @@ -30,51 +26,16 @@ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDS ssl_prefer_server_ciphers on; ``` -## Configure Reverse Proxy - -AcePanel v2.4.10+ comes with a built-in reverse proxy configuration generator, which you can access through the top right corner of the site rewrite configuration page. - -Note: If you encounter issues with static resources like CSS/JS not loading properly after setting up a reverse proxy, please remove the **Do not log static files** section from the site's main configuration file. - -## Configure Process Monitoring - -1. Install Supervisor manager and open it. -2. Create processes that need to be monitored in the Supervisor manager (it's not recommended to use root as the running user). -3. Common issues: [https://tom.moe/t/supervisor/3112](https://tom.moe/t/supervisor/3112) - ## Configure IPv6 If you want to enable IPv6 support, you need to add `[::]:80` and `[::]:443` to the website's listening address configuration. -## Configure Container Image Acceleration +## CDN 配置 HTTPS 后网站是否需要开启 HTTPS? -Due to certain reasons, domestic users in China may be unable to connect to Docker Hub to pull container images, thus requiring image acceleration configuration. +取决于 CDN 侧的回源协议配置: -### For Podman - -Open the Podman settings page in the Panel, and navigate to the Registry Configuration tab. - -Scroll to the bottom of the configuration file, add the following configuration and save: - -``` -[[registry]] -location = "docker.io" -[[registry.mirror]] -location = "docker.1ms.run" -``` - -Where docker.1ms.run is the configured image acceleration address. You can refer to other tutorials to set up and use it. - -### For Docker - -Open the Docker settings page in the Panel, and navigate to the Configuration tab. - -Add the following configuration and save: - -```json -{ - "registry-mirrors": ["https://docker.1ms.run"] -} -``` - -Where https://docker.1ms.run is the configured image acceleration address. You can refer to other tutorials to set up and use it. +| CDN 回源协议 | 网站 HTTPS 配置 | +|----------|---------------------------| +| HTTP | 无需开启 HTTPS | +| HTTPS | 必须开启 HTTPS | +| 协议跟随 | 必须开启 HTTPS 且不能开启 HTTP 重定向 | diff --git a/en/quickstart/cli.md b/en/quickstart/cli.md new file mode 100644 index 0000000..e16f899 --- /dev/null +++ b/en/quickstart/cli.md @@ -0,0 +1,46 @@ +AcePanel 提供了命令行工具,方便用户在无法访问 Web 界面时进行基本的面板管理操作。 + +## Managing Panel Service + +Do not stop or restart AcePanel while background tasks are still running, as this may cause task stuck or data loss. + +* Start Panel: `acepanel start` +* Stop Panel: `acepanel stop` +* Restart Panel: `acepanel restart` + +## Panel Command Line + +下表列出了常用的 AcePanel 命令行工具命令: + +| Command | Description | +|--------------------------------------------------------|------------------------------------------------------------------------------| +| `acepanel status` | Get the current status of the AcePanel service | +| `acepanel start` | Start the AcePanel service | +| `acepanel stop` | Stop the AcePanel service | +| `acepanel restart` | Restart the AcePanel service | +| `acepanel update` | Update AcePanel to the latest version | +| `acepanel sync` | Sync AcePanel cached data with cloud | +| `acepanel fix` | Fix AcePanel upgrade issues | +| `acepanel info` | Output AcePanel basic information and generate new password | +| `acepanel user list` | List all users | +| `acepanel user username ` | Change a user's username | +| `acepanel user password ` | Change a user's password | +| `acepanel user 2fa ` | Toggle two-factor authentication for a user | +| `acepanel https ` | Enable or disable HTTPS for AcePanel | +| `acepanel https generate` | Obtain a free certificate or generate a self-signed certificate for AcePanel | +| `acepanel entrance ` | Enable or disable the AcePanel access entrance | +| `acepanel bind-domain off` | Disable domain binding for AcePanel | +| `acepanel bind-ip off` | Disable IP binding for AcePanel | +| `acepanel bind-ua off` | Disable User-Agent binding for AcePanel | +| `acepanel port ` | Change the AcePanel listening port | +| `acepanel sync-time ` | Sync server time with NTP | +| `acepanel clear-task` | Clear all tasks in the task queue if they are stuck | +| `acepanel help` | Display help information for AcePanel commands | + +For example, to change a user's password, you can use: + +```bash +acepanel user password haozi 123456 +``` + +This will change the password for the user `haozi` to `123456`. diff --git a/en/quickstart/container.md b/en/quickstart/container.md deleted file mode 100644 index 9c658e4..0000000 --- a/en/quickstart/container.md +++ /dev/null @@ -1,25 +0,0 @@ -# Manage Containers - -Before starting, you need to install the Docker / Podman container engine. - -After the container engine is installed, you can go to the Panel's container management section to create containers (pgadmin4 is used as an example here). - -First, navigate to the Images tab to pull the required images. This may take several minutes to tens of minutes depending on your network environment. - -![Pull Image](/images/container/container1.png) - -After the image is pulled, navigate to the Containers tab to start creating a container. - -![Create Container](/images/container/container2.png) - -Fill in the form according to the container's instructions. The pgadmin4 image used here needs to map port 80 and configure 2 default environment variables, with no need to map directories. - -After the container is created, you can click the refresh button in the upper right corner and the log button on the right side of the container to check if it has started properly. - -![Container Start](/images/container/container3.png) - -If the container fails to start, please make corrections according to the logs. - -If you have mapped external ports, you need to go to the firewall menu to allow the corresponding ports. - -![Creation Successful](/images/container/container4.png) diff --git a/en/quickstart/first-container.md b/en/quickstart/first-container.md new file mode 100644 index 0000000..c812f93 --- /dev/null +++ b/en/quickstart/first-container.md @@ -0,0 +1,42 @@ +以下演示如何在 AcePanel 使用 Docker 快速部署一个 pgAdmin 4 PostgreSQL 管理工具容器。 + +## 前提条件 + +- 已安装并运行 AcePanel 面板 + +## 步骤 1:登录面板 + +使用浏览器访问 AcePanel 面板的地址,输入管理员账号和密码登录。 + +## 步骤 2:安装 Docker + +1. 在面板左侧导航栏中,点击「应用」。 +2. 在「原生应用」列表中,找到并安装 Docker。 +3. 安装中可前往「任务」页面查看进度。 +4. 安装完成后,确保 Docker 服务已启动。 +5. (可选)对于国内服务器,建议配置毫秒镜像提供的付费源以提升下载速度。可前往[官网](https://1ms.run/)获取相关信息。 + +## 步骤 3:创建 pgAdmin 4 编排 + +1. 在面板左侧导航栏中,点击「应用」。 +2. 切换到「容器编排」标签页。 +3. 在页面找到「pgAdmin 4」编排模板,点击「部署」按钮。 +4. 弹窗中选择创建新编排并填写以下信息: + - **编排名称**:(可选)自行起一个编排名称(例如 `my-pgadmin4`)。 + - **自动启动**:启用此项以在编排创建完成后自动启动容器。 + - **自动防火墙**:启用此项以自动添加系统防火墙规则开放对应端口。 + - **访问端口**:将容器的 `80` 端口映射到主机的某个未被占用的端口(例如 `999`)。 + - **管理员邮箱**:填写用于登录 pgAdmin 4 的管理员邮箱地址。 + - **管理员密码**:填写用于登录 pgAdmin 4 的管理员密码。 +5. 点击「下一步」按钮,进入预览页面,可在此对编排配置进行最终确认与调整。 +6. 确认无误后点击「创建」按钮,完成编排创建。 + +## 步骤 4:等待容器下载与启动 + +若启用了「自动启动」选项,编排创建完成后容器将自动弹窗显示下载与启动进度。若未启用此选项,可前往「容器」->「编排」页面手动启动容器。 + +## 步骤 5:访问 pgAdmin 4 服务 + +1. 容器启动完成后,使用浏览器访问 `http://服务器IP:映射端口`(例如 `http://x.x.x.x:999`)。 +2. 在登录页面输入之前设置的管理员邮箱和密码,点击「登录」按钮进入 pgAdmin 4 后台管理界面。 +3. 恭喜!您已成功使用 AcePanel 部署了 pgAdmin 4 容器。 diff --git a/en/quickstart/first-project.md b/en/quickstart/first-project.md new file mode 100644 index 0000000..e69de29 diff --git a/en/quickstart/first-website.md b/en/quickstart/first-website.md new file mode 100644 index 0000000..2e1ec8b --- /dev/null +++ b/en/quickstart/first-website.md @@ -0,0 +1,48 @@ +以下演示如何在 AcePanel 使用 Nginx + MySQL + PHP 快速部署一个 WordPress 博客网站。 + +## 前提条件 + +- 已安装并运行 AcePanel 面板 +- 已准备好 WordPress 安装包(可从 [WordPress 官方网站](https://wordpress.org/download/) 下载) + +## 步骤 1:登录面板 + +使用浏览器访问 AcePanel 面板的地址,输入管理员账号和密码登录。 + +## 步骤 2:安装环境 + +1. 在面板左侧导航栏中,点击「应用」。 +2. 在「原生应用」列表中,找到并安装 Nginx、Percona/MySQL/MariaDB。 +3. 在「运行环境」列表中,安装所需版本的 PHP(建议使用 PHP 8.0 或更高版本)。 +4. 环境安装中可前往「任务」页面查看进度,安装完成后确保各服务均已启动。 + +## 步骤 3:创建网站 + +1. 在面板左侧导航栏中,点击「网站」。 +2. 点击「PHP」标签页,切换到 PHP 网站管理页面。 +3. 点击页面的「创建网站」按钮。 +4. 在弹出的对话框中,填写以下信息: + - **名称**:自行起一个网站名称(例如 `my-wordpress`),创建完成后不可修改。 + - **域名**:输入您的域名(例如 `example.com`),若没有域名亦可直接输入服务器 IP 地址。 + - **根目录**:选择网站根目录(可直接留空使用默认路径)。 + - **PHP 版本**:选择刚才安装的 PHP 版本。 + - **数据库**:选择「MySQL」并复制生成的数据库名称、用户名和密码备用。 +5. 点击「创建」按钮,完成网站创建。 + +## 步骤 4:上传 WordPress 安装包 + +1. 网站创建完成后,点击网站列表中的「目录」,进入文件管理页面。 +2. 点击「上传」按钮,选择并上传之前下载的 WordPress 安装包(通常为 `.zip` 格式)。 +3. 上传完成后,双击/右键上传的压缩包,点击「解压」按钮,将文件解压到当前目录。 +4. 进入解压后的 `wordpress` 目录,Ctrl + A 全选所有文件,Ctrl + X 剪切,然后返回上级目录,Ctrl + V 粘贴所有文件到网站根目录。 +5. 删除解压后的空文件夹和压缩包。 + +## 步骤 5:配置 WordPress +1. 返回网站列表,点击「编辑」按钮,进入网站配置页面。 +2. 在「伪静态」标签页中,选择预设的「wordpress」伪静态规则,点击「保存」。 +3. (可选)在「HTTPS」标签页中,点击「一键签发证书」申请并启用免费的 Let's Encrypt SSL 证书。 +4. 保存配置后,使用浏览器访问您的域名(例如 `http://example.com` 或 `https://example.com`),进入 WordPress 安装页面。 +5. 按照页面提示,选择语言,填写网站标题、管理员用户名、密码、电子邮箱等信息。 +6. 在数据库设置页面,填写之前创建网站时生成的数据库名称、用户名和密码,数据库主机填写 `localhost`,点击「提交」。 +7. 完成安装后,使用管理员账号登录 WordPress 后台,开始管理和发布内容。 +8. 恭喜!您已成功使用 AcePanel 部署了一个 WordPress 网站。 diff --git a/en/quickstart/install.md b/en/quickstart/install.md index 132cbe1..860f890 100644 --- a/en/quickstart/install.md +++ b/en/quickstart/install.md @@ -1,13 +1,8 @@ -# Install Panel +AcePanel supports the latest two stable releases of mainstream `amd64` and `arm64` architecture systems. Installation of the LNMP environment has been tested on all systems listed in the table below. -AcePanel supports the latest two stable releases of mainstream `amd64` and `arm64` architecture systems. Installation of -the LNMP environment has been tested on all systems listed in the table below. +It is recommended to use systems marked as **Recommended**. Unless there are special circumstances, it is not recommended to use systems marked as **Not Recommended**. -It is recommended to use systems marked as **Recommended**. Unless there are special circumstances, it is not -recommended to use systems marked as **Not Recommended**. - -For systems not listed in the table below, you can try installing on your own, but no free technical support will be -provided. +For systems not listed in the table below, you can try installing on your own, but no free technical support will be provided. | System | Version | Note | |------------------|---------|-----------------| @@ -24,16 +19,13 @@ provided. | OpenCloudOS | 9 | Supported | | TencentOS Server | 4 | Supported | -As system versions continue to update, we may also terminate support for some overly outdated systems to ensure the -robustness of the Panel. +As system versions continue to update, we may also terminate support for some overly outdated systems to ensure the robustness of the Panel. ## Start Installation -> If you need to mount partitions, please complete before installing the Panel. Directory migration is not -> supported after Panel installation. +> If you need to mount partitions, please complete before installing the Panel. Directory migration is not supported after Panel installation. -**AcePanel recommends -using [LFCloud high-performance AMD EYPC server](https://www.dkdun.cn/aff/MQZZNVHQ) for installation.** +**AcePanel recommends using [LFCloud high-performance AMD EYPC server](https://www.dkdun.cn/aff/MQZZNVHQ) for installation.** Log in to the server as `root` user and run the following command to install the Panel: diff --git a/en/quickstart/introduction.md b/en/quickstart/introduction.md new file mode 100644 index 0000000..55b863d --- /dev/null +++ b/en/quickstart/introduction.md @@ -0,0 +1,38 @@ +AcePanel 是一款专业的服务器运维管理面板,致力于为用户提供简单、高效且安全的服务器管理解决方案。 + +## 产品优势 + +1. 极低占用: Go 语言开发,安装包小,占用低,单文件运行,不会对系统性能造成影响 +2. 低破坏性: 设计为尽可能减少对系统的额外修改,在同类产品中,我们对系统的修改最少 +3. 追随时代: 整体设计走在时代前沿,对新系统兼容性好,在同类产品中处于领先地位 +4. 高效运维: 功能完善,自定义能力强,既可快速部署小型网站,也可基于定制化需求部署复杂应用 +5. 离线运行: 支持离线模式,甚至可以在部署完成后停止面板进程,不会对已有服务造成任何影响 +6. 安全稳定: 面板采用业界多种技术保障本体安全性,已在我们的多个生产环境中长期稳定运行 +7. 全面开源: 少有的全开源面板,您可以在遵守开源协议的前提下对面板自由修改、二次开发 +8. 永久免费: 承诺面板本体未来不会引入任何收费/授权功能,永久免费使用 + +## 产品功能 + +#### 快速建站 + +深度集成 Nginx、MySQL、PHP 等主流服务,一键部署 LNMP 环境,一键搭建反向代理,支持多版本共存切换。 + +#### 高效管理 + +提供类似 Windows 资源管理器的文件管理功能,全面支持快捷键操作,支持批量处理文件,支持在线编辑代码。 + +#### 一键备份 + +支持网站、数据库一键备份与恢复,支持定时备份与远程存储,保障数据安全。 + +## 与同类产品的对比 + + +| 特性 | AcePanel | 同类产品 1 | 同类产品 B | +|------|-----------------|-----------------------|-----------------------------| +| 用户界面 | 清爽的现代化设计 | 现代化设计 | 功能繁杂且广告较多 | +| 开源情况 | 完整开源,全自动化构建 | 仅开源非专业版部分 | 部分开源,提交记录不完整 | +| 性能优化 | 极其高效,单文件运行 | 需 core 及 agent 双倍资源占用 | 资源占用较高,优化差 | +| 系统支持 | 主流 Linux 发行版 | 主流 Linux 发行版 | 支持较多但兼容性各异 | +| 应用中心 | 原生应用 + 容器编排双重支持 | 仅支持容器编排 | 应用陈旧,更新缓慢 | +| 技术栈 | Go 1.25 + Vue 3 | Go 1.24 + Vue 3 | Python 3.7 + Vue 3 + jQuery | diff --git a/en/quickstart/news/acepanel-3-release.md b/en/quickstart/news/acepanel-3-release.md new file mode 100644 index 0000000..69d8d59 --- /dev/null +++ b/en/quickstart/news/acepanel-3-release.md @@ -0,0 +1,166 @@ +好久不见,经过几次跳票延期,AcePanel 3.0 终于在 2026 年初完成开发,经过了约 3 个星期的内测,现在是时候发布了。 + +## 升级全新品牌名称 AcePanel + +AcePanel 原名耗子面板,是本人 2022 年底开发的服务器运维管理面板。 + +之前收到最多的一个反馈就是耗子面板这个名字不好听,于是我们现在换了更高端大气上档次的名字 - AcePanel,你也可以叫它王牌面板/艾斯面板。 + +![AcePanel Logo](https://wmimg.com/i/1424/2026/01/6975d8a45a01d.png) + +本文以下 AcePanel 均表示 AcePanel 3.0 版本 + +## 支持运行环境与项目管理 + +AcePanel 这次最大的更新就是新增了运行环境功能,支持一键安装与管理 Go、Java、Node.js、PHP、Python 等运行环境,支持多版本同时共存。 + +![AcePanel 运行环境](https://wmimg.com/i/1424/2026/01/6975d8a49a638.png) + +同时 AcePanel 基于 Linux systemd 的强大能力全新开发了项目管理功能,支持通过安装的运行环境一键创建与管理各类 Web 项目和常驻程序,可平替 PM2、Supervisor 等工具。 + +![AcePanel 项目列表](https://wmimg.com/i/1424/2026/01/6975d8a386a79.png) + +![AcePanel 项目编辑](https://wmimg.com/i/1424/2026/01/6975d8a4454f7.png) + +## 网站管理重构 + +AcePanel 还对网站管理功能进行了重构,重新组织了网站目录结构,支持反向代理、纯静态、PHP 3 种网站类型,并新增了多项常用配置以及自定义功能。 + +![AcePanel 反向代理网站上游编辑](https://wmimg.com/i/1424/2026/01/6975d8a3e8c5b.png) + +![AcePanel 反向代理网站代理编辑](https://wmimg.com/i/1424/2026/01/6975d8a59b896.png) + +新的网站目录结构允许灵活添加各种自定义配置,且不易冲突。 + +## 应用中心优化 + +AcePanel 正式上线期待已久的容器编排模版功能,支持一键部署 WordPress、Nextcloud、GitLab 等常用程序。 + +![AcePanel 编排模版](https://wmimg.com/i/1424/2026/01/6975d8a59c3b9.png) + +(缺少你想要的程序?欢迎向 AcePanel 模版库提交 PR,方式可见文末) + +AcePanel 在原有 OpenResty 与 Percona 的基础上新增 Nginx 与 MySQL、MariaDB,同时还优化了许多应用的安装流程以提高安装速度,特别对 Percona/MySQL/MariaDB 为常用系统使用预制安装包以极大提高安装速度和成功率。 + +(实测 MySQL 通常可以在 2 分钟内完成安装) + +## 备份优化 + +AcePanel 优化了备份功能,新增备份存储设置,支持添加 S3、SFTP 等常用远程存储。 + +(你可能会问为什么没有 OSS、COS?这是因为 OSS、COS 等均提供 S3 兼容接口,可直接使用 S3 配置,因此没必要单独为它们引入依赖以及额外开发。) + +![AcePanel 添加备份存储](https://wmimg.com/i/1424/2026/01/6975d8a5c18e5.png) + +## 全新的面板助手 + +AcePanel 使用 Go 语言重写了原来基于 shell 脚本的安装器,新的面板助手全面支持交互式安装及多语言,提供更好、更现代的用户体验。 + +![AcePanel 安装器](https://wmimg.com/i/1424/2026/01/6975d8a5d98b9.png) + +## 使用优化 + +AcePanel 全面优化了文件管理,还原类似 Windows 资源管理器的操作体验(支持快捷键操作)。 + +![AcePanel 文件管理(列表)](https://wmimg.com/i/1424/2026/01/6975d8a64b601.png) + +![AcePanel 文件管理(图标)](https://wmimg.com/i/1424/2026/01/6975d959712cf.png) + +基于 Monaco 开发全新的文件编辑器,即是编辑器,亦可作为在线 IDE 使用(同样支持快捷键操作)。 + +![AcePanel 文件编辑](https://wmimg.com/i/1424/2026/01/6975d95a50149.png) + +工具箱能力全面提升,进程管理支持右键操作,同时新增 SSH 服务管理,磁盘管理,日志清理以及 Web 钩子等功能。 + +![AcePanel 进程管理](https://wmimg.com/i/1424/2026/01/6975d95ab38b2.png) + +![AcePanel SSH 管理](https://wmimg.com/i/1424/2026/01/6975d95a283e1.png) + +![AcePanel Web 钩子](https://wmimg.com/i/1424/2026/01/6975d95932b1d.png) + +计划任务周期选择器重写,提供更友好的交互体验。 + +![AcePanel 创建计划任务](https://wmimg.com/i/1424/2026/01/6975d95b1ac63.png) + +## 其他优化 + +- 支持使用 ACME 申请 Let's Encrypt IP 证书 +- 入口错误页支持自定义 +- 登录支持自动开启验证码 +- 自定义 Logo 与隐藏菜单支持长期保存 +- 新增操作日志记录与查看功能 +- 证书管理新增 ACME ARI 支持 +- 图标全面本地化,不再需要依赖外部 CDN +- Nginx/OpenResty 新增 Stream 支持(四层代理) +- 新增 PHP 8.5 支持 +- 新增 Apache Web 服务器基础支持 +- 新增 LiteSSL 证书支持 +- 容器与编排创建/启动支持实时显示进度 +- 容器支持一键进入终端 +- 资源监控支持自定义时间范围与网卡/磁盘选择 +- 首页应用支持拖拽排序 +- 文件管理支持大文件分片上传 +- 文件管理支持压缩包双击解压 +- 应用与运行环境、容器模版支持分类筛选 +- SSH 终端支持私钥登录 +- 系统工具箱 - DNS 适配现代网络管理方式 +- 支持可视化修改 Docker 基本设置 +- 数据库服务器列表支持一键进入终端 +- 部分删除操作新增 5s 倒计时确认 + +## 问题修复 + +- 修复登录超过 120 分钟后面板自动登出的问题 +- 修复 Docker 29+ 版本无法使用面板容器功能的问题 +- 修复面板偶现 ERR_CONNECTION_REFUSED 错误的问题 +- 修复面板 Websocket 会话存在资源泄露的问题 +- 修复部分情况下防火墙端口放行不生效的问题 +- 修复 PHP 设置默认 cli 版本不生效的问题 +- 修复 rsync secrets 换行符写入不正确的问题 +- 修复 fail2ban IPv6 地址显示和解封问题 +- 其他已知问题修复 + +## 兼容性变化 + +鉴于 openEuler 及 Alibaba Cloud Linux 4 和 Anolis 23 等新版信创系统把软件源改的面目全非,适配极其困难,因此 AcePanel 3.0 决定放弃对这三个发行版的支持。建议切换到 AlmaLinux / Rocky Linux 使用,如必须使用信创系统可考虑 OpenCloudOS 9 或 TencentOS Server 4。 + +同时 AcePanel 3.0 版本起,不再支持基于 4.x 内核的 RHEL 8-based 系统(AlmaLinux 8/Rocky Linux 8),请升级至 9.x/10.x 使用。 + +其次为支持预制安装包以解决饱受诟病的 MySQL 编译慢问题,AcePanel 修改了默认安装目录为 `/opt/ace` 且不再允许自定义(预计影响不大,仍可在安装前挂载数据盘)。 + + +## 关于旧版本升级及维护 + +计划在 AcePanel 3.0 稳定一段时间之后推出旧版耗子面板 2.x 升级至 AcePanel 3.0 的脚本,鉴于改动较大,预计无法实现完美升级,请留意。 + +旧版耗子面板 2.x 仍将继续维护一段时间的安全更新(预计到 2026 年底),您可在此期间自行安排时间点进行升级。 + +## 开源协议变化 + +新版本 AcePanel 决定使用更宽松的开源协议 BSD-3,希望未来能有更多的开发者参与进来,一起打造更好用的服务器面板。 + +当前可参与贡献的项目如下: + +- [AcePanel 主程序(求star)](https://github.com/acepanel/panel) +- [AcePanel 安装器](https://github.com/acepanel/helper) +- [AcePanel 容器模版库](https://github.com/acepanel/templates) +- [AcePanel 文档](https://github.com/acepanel/acepanel.github.io) +- [AcePanel 翻译](https://zh.crowdin.com/project/acepanel) + +不会代码?没关系,欢迎发表使用 AcePanel 搭建各种服务、发掘不同玩法的文章,帮助推广 AcePanel。 + +## 结束语 + +写这篇文章的时候是夜里 4 点多,转眼这个项目已经在上个月度过其 3 岁生日,当年写下第一行代码时我还对 Go 一窍不通,如今已经成长为有些人口中的大佬。 + +AcePanel 是我的青春,我希望将其写到极致而不留遗憾,因此来回重构了数次,如果因此影响了您的使用,我在此说声道歉。现在自己年纪也慢慢大了,加上工作与生活的琐事繁多,未来再想重构也不一定折腾得动了。 + +2026 年的 AI 已经非常强大,AcePanel 新版本中有大量复杂的交互逻辑均使用 Claude Opus 4.5 辅助开发,我承认以我的水平难以写出这样完善的交互。也许继续发展下去未来或将不再需要面板,而是直接对 AI 说:帮我安装 Nginx;帮我创建 xxx 项目。谁知道呢? + +最后,感谢赞助商微晓朵和林枫云以及参与 AcePanel 内测的所有用户,没有你们的帮助 AcePanel 将难以如期发布。 + +附上 AcePanel 新版本的安装命令,欢迎测试体验: + +```bash +bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh) +``` diff --git a/en/quickstart/panel.md b/en/quickstart/panel.md deleted file mode 100644 index 964080b..0000000 --- a/en/quickstart/panel.md +++ /dev/null @@ -1,35 +0,0 @@ -# Manage Panel - -Do not stop or restart the Panel while tasks are still running, as this may cause issues. - -* Start Panel: `acepanel start` -* Stop Panel: `acepanel stop` -* Restart Panel: `acepanel restart` - -## Panel Command Line - -```bash -acepanel -``` - -Follow the prompts to complete the necessary commands for operation. - -For example, to change a user's password, you can use: - -```bash -acepanel user password haozi 123456 -``` - -This will change the password for the user `haozi` to `123456`. - -## Uninstall Panel - -It is primarily recommended to back up data and reinstall the system, as this ensures a clean system. - -If you are unable to reinstall the system, please log in to the server as `root` user and execute the following command to uninstall the Panel: - -```shell -bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh) -``` - -Before uninstalling the Panel, be sure to back up all data and uninstall all Panel applications in advance. Data will be **unrecoverable** after uninstallation! diff --git a/en/quickstart/uninstall.md b/en/quickstart/uninstall.md new file mode 100644 index 0000000..72bb00c --- /dev/null +++ b/en/quickstart/uninstall.md @@ -0,0 +1,7 @@ +您可以使用 AcePanel 的帮助工具卸载 AcePanel。 + +```shell +bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh) +``` + +注意:在卸载面板之前,请务必提前备份所有数据并卸载所有面板应用。卸载后数据将**不可恢复**! \ No newline at end of file diff --git a/en/quickstart/upgrade.md b/en/quickstart/upgrade.md new file mode 100644 index 0000000..38a4ca3 --- /dev/null +++ b/en/quickstart/upgrade.md @@ -0,0 +1,31 @@ +升级面板有自动升级,手动升级和 SSH 升级三种方式,默认安装完成后面板已配置为每日自动升级,通常您无需手动操作即可保持面板为最新版本。 + +## 自动升级 + +AcePanel 默认开启自动升级功能,面板会在每天的 2 点左右自动检测更新并进行升级,升级过程中面板会短暂不可用(通常不超过 1 分钟),请您耐心等待。 + +若您希望手动升级,可在面板「设置」->「安全」关闭并保存「自动升级」设置,然后使用手动升级或 SSH 升级方式进行升级。 + +## 手动升级 + +您可以在面板「首页」点击右上角的「更新」按钮,若有新版本会弹出升级页面,点击「更新」按钮即可开始升级。 + +升级过程中请勿刷新浏览器以及操作面板,升级完成后页面会自动刷新(通常不超过 1 分钟),若页面未自动刷新请手动刷新页面。 + +## SSH 升级 + +您也可以通过 SSH 手动升级面板,适用于无法通过面板升级的情况或者面板无法访问的情况。 + +使用 SSH 登录到服务器,确保您以 root 用户或具有 sudo 权限的用户身份登录,然后执行以下命令: + +```bash +acepanel update +``` + +升级过程中请勿关闭 SSH 连接,升级完成后会有提示信息。 + +## 升级注意事项 + +1. 升级前请确保已备份重要数据,升级过程通常不会影响数据,但以防万一总是好的。 +2. 若升级过程中遇到问题,请参考[常见问题](../faq/panel)或前往[社区发帖](https://tom.moe)联系支持获取帮助。 +3. 升级完成后建议清除浏览器缓存以确保加载最新的前端资源。 diff --git a/zh_CN/about.md b/zh_CN/about.md deleted file mode 100644 index 3460f59..0000000 --- a/zh_CN/about.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -sidebar: false -prev: false -next: false ---- - - - -# 关于 - -AcePanel 是一款专业的服务器运维管理面板,致力于为用户提供简单、高效、安全的服务器管理解决方案。 - -| 愿景 | 使命 | 价值观 | -| ----------------- | ------------- | -------------- | -| 成为领先的服务器管理解决方案提供商 | 让服务器管理变得简单而高效 | 用户至上、创新驱动、专业专注 | - -## 团队介绍 - - - -## 发展历程 - -:::timeline 2026 - 3.0 时代 -在 2026 年,我们推出了备受期待的 3.0 版本,推出了全新的用户界面和更多高级功能 -::: - -:::timeline 2025 - 稳步发展 -在 2025 年,我们专注于优化用户体验和增强系统稳定性,发布了 2.4 系列版本 -::: - -:::timeline 2024 - 全新起航 -面板得到了众多赞助商的支持,2024 年下半年发布了全新的 2.3 版本 -::: - -:::timeline 2023 - 技术积累 -使用 Go 对面板进行重写,发布 2.0 2.1 系列版本,积累了大量开发经验 -::: - -:::timeline 2022 - 项目立项 -2022 年中项目立项,年末发布 1.0 版本 -::: - -## 联系我们 - -| 名称 | 联系方式 | -| ---- | ------------------------------------------------------------------------------------------ | -| 企业微信 | [点击联系](https://work.weixin.qq.com/kfid/kfc20ea8e38b5a4e73a) | -| QQ | [826896000](https://wpa.qq.com/msgrd?v=3&uin=826896000&site=qq&menu=yes) | -| 电子邮件 | [haozi@loli.email](mailto:haozi@loli.email) | -| 公司地址 | 天津市武清区黄庄街道泉里路1号智库大厦206室 | diff --git a/zh_CN/advanced/api.md b/zh_CN/advanced/api.md deleted file mode 100644 index 4aca1ab..0000000 --- a/zh_CN/advanced/api.md +++ /dev/null @@ -1,661 +0,0 @@ -# API 参考文档 - -## 概述 - -AcePanel 提供了一套安全的 RESTful 接口,用于与面板进行交互。 所有 API 请求都需要进行 HMAC-SHA256 签名认证以确保通信的安全性和完整性。 所有 API 请求都需要进行 HMAC-SHA256 签名认证以确保通信的安全性和完整性。 - -## 基础信息 - -- **基础 URL**: `http(s)://your-panel-domain/{entry}/api/` -- **内容类型**: 所有请求和响应均使用 `application/json` -- **字符编码**: UTF-8 - -## 认证机制 - -API 使用 HMAC-SHA256 签名算法进行认证。每个请求必须包含以下 HTTP 头: 每个请求必须包含以下 HTTP 头: - -| 头部名称 | 描述 | -| --------------- | --------------------------------------------------------------- | -| `Content-Type` | 设置为 `application/json` | -| `X-Timestamp` | 当前 UNIX 时间戳(秒) | -| `Authorization` | 身份验证信息,格式为 `HMAC-SHA256 Credential={id}, Signature={signature}` | - -## 签名算法 - -签名过程包含四个主要步骤: - -### 1. 构造规范化请求 - -规范化请求字符串由以下部分组成,各部分之间使用换行符(\n)分隔: - -``` -HTTP方法 -规范化路径 -规范化查询字符串 -请求体的SHA256哈希值 -``` - -**注意**:规范化路径应始终使用 `/api/` 开头的路径部分,忽略入口前缀。 - -### 2. 构造待签名字符串 - -待签名字符串包含以下部分,各部分使用换行符(\n)分隔: - -``` -"HMAC-SHA256" -时间戳 -规范化请求的SHA256哈希值 -``` - -### 3. 计算签名 - -使用您的令牌(token)对待签名字符串进行 HMAC-SHA256 计算,然后将结果转换为十六进制字符串。 - -### 4. 构造授权头 - -将计算得到的签名添加到 `Authorization` 头: - -``` -Authorization: HMAC-SHA256 Credential={id}, Signature={signature} -``` - -## Go 示例 - -```go -package main - -import ( - "bytes" - "crypto/hmac" - "crypto/sha256" - "encoding/hex" - "fmt" - "io" - "net/http" - "strings" - "time" -) - -func main() { - // 创建一个获取用户信息的请求 - req, err := http.NewRequest("GET", "http://example.com/entrance/api/user/info", nil) - if err != nil { - fmt.Println("Error creating request:", err) - return - } - - // 设置内容类型 - req.Header.Set("Content-Type", "application/json") - - // 签名请求 - 传入您的用户ID和API令牌 - if err = SignReq(req, uint(16), "YourSecretToken"); err != nil { - fmt.Println("Error signing request:", err) - return - } - - // 发送请求 - client := &http.Client{} - resp, err := client.Do(req) - if err != nil { - fmt.Println("Error sending request:", err) - return - } - defer resp.Body.Close() - - // 处理响应 - body, err := io.ReadAll(resp.Body) - if err != nil { - fmt.Println("Error reading response:", err) - return - } - - fmt.Println("Response Status:", resp.Status) - fmt.Println("Response Body:", string(body)) -} - -// SignReq 对HTTP请求进行签名 -func SignReq(req *http.Request, id uint, token string) error { - // 步骤一:构造规范化请求 - var body []byte - var err error - - if req.Body != nil { - // 读取并保存请求体 - body, err = io.ReadAll(req.Body) - if err != nil { - return err - } - // 恢复请求体以便后续使用 - req.Body = io.NopCloser(bytes.NewReader(body)) - } - - // 规范化路径 - canonicalPath := req.URL.Path - if !strings.HasPrefix(canonicalPath, "/api") { - index := strings.Index(canonicalPath, "/api") - if index != -1 { - canonicalPath = canonicalPath[index:] - } - } - - canonicalRequest := fmt.Sprintf("%s\n%s\n%s\n%s", - req.Method, - canonicalPath, - req.URL.Query().Encode(), - SHA256(string(body))) - - // 步骤二:设置时间戳和构造待签名字符串 - timestamp := time.Now().Unix() - req.Header.Set("X-Timestamp", fmt.Sprintf("%d", timestamp)) - - stringToSign := fmt.Sprintf("%s\n%d\n%s", - "HMAC-SHA256", - timestamp, - SHA256(canonicalRequest)) - - // 步骤三:计算签名 - signature := HMACSHA256(stringToSign, token) - - // 步骤四:设置Authorization头 - authHeader := fmt.Sprintf("HMAC-SHA256 Credential=%d, Signature=%s", id, signature) - req.Header.Set("Authorization", authHeader) - - return nil -} - -func SHA256(str string) string { - sum := sha256.Sum256([]byte(str)) - dst := make([]byte, hex.EncodedLen(len(sum))) - hex.Encode(dst, sum[:]) - return string(dst) -} - -func HMACSHA256(data string, secret string) string { - h := hmac.New(sha256.New, []byte(secret)) - h.Write([]byte(data)) - return hex.EncodeToString(h.Sum(nil)) -} -``` - -## PHP 示例 - -```php - $timestamp, - 'signature' => $signature, - 'id' => $id - ]; -} - -// 示例请求 -$apiUrl = 'http://example.com/entrance/api/user/info'; -$method = 'GET'; -$body = ''; // 对于GET请求,通常没有请求体 -$id = 16; -$token = 'YourSecretToken'; - -// 生成签名信息 -$signingData = signRequest($method, $apiUrl, $body, $id, $token); - -// 准备HTTP请求头 -$headers = [ - 'Content-Type: application/json', - 'X-Timestamp: ' . $signingData['timestamp'], - 'Authorization: HMAC-SHA256 Credential=' . $signingData['id'] . ', Signature=' . $signingData['signature'] -]; - -// 使用cURL发送请求 -$ch = curl_init($apiUrl); -curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); -curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); -curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); - -if (!empty($body)) { - curl_setopt($ch, CURLOPT_POSTFIELDS, $body); -} - -// 执行请求并获取响应 -$response = curl_exec($ch); -$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); -curl_close($ch); - -// 输出结果 -echo "响应状态码: " . $statusCode . PHP_EOL; -echo "响应内容: " . $response . PHP_EOL; -``` - -## Python 示例 - -```python -import hashlib -import hmac -import json -import requests -import time -from urllib.parse import urlparse, parse_qs - -def sha256_hash(text): - """计算字符串的SHA256哈希值""" - return hashlib.sha256(text.encode('utf-8')).hexdigest() - -def hmac_sha256(key, message): - """使用HMAC-SHA256算法计算签名""" - return hmac.new(key.encode('utf-8'), message.encode('utf-8'), hashlib.sha256).hexdigest() - -def sign_request(method, url, body, user_id, token): - """为API请求生成签名""" - # 解析URL - parsed_url = urlparse(url) - path = parsed_url.path - query = parsed_url.query - - # 规范化路径 - canonical_path = path - if not path.startswith('/api'): - api_pos = path.find('/api') - if api_pos != -1: - canonical_path = path[api_pos:] - - # 构造规范化请求 - body_str = body if body else "" - canonical_request = "\n".join([ - method, - canonical_path, - query, - sha256_hash(body_str) - ]) - - # 获取当前时间戳 - timestamp = int(time.time()) - - # 构造待签名字符串 - string_to_sign = "\n".join([ - "HMAC-SHA256", - str(timestamp), - sha256_hash(canonical_request) - ]) - - # 计算签名 - signature = hmac_sha256(token, string_to_sign) - - return { - "timestamp": timestamp, - "signature": signature, - "id": user_id - } - -# 示例请求 -api_url = "http://example.com/entrance/api/user/info" -method = "GET" -body = "" # GET请求通常没有请求体 -user_id = 16 -token = "YourSecretToken" - -# 生成签名信息 -signing_data = sign_request(method, api_url, body, user_id, token) - -# 准备HTTP请求头 -headers = { - "Content-Type": "application/json", - "X-Timestamp": str(signing_data["timestamp"]), - "Authorization": f"HMAC-SHA256 Credential={signing_data['id']}, Signature={signing_data['signature']}" -} - -# 发送请求 -response = requests.request( - method=method, - url=api_url, - headers=headers, - data=body -) - -# 输出结果 -print(f"响应状态码: {response.status_code}") -print(f"响应内容: {response.text}") -``` - -## Java 示例 - -```java -import java.net.URI; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.security.MessageDigest; -import java.time.Instant; -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; -import java.util.Base64; - -/** - * AcePanel API 请求示例 (Java) - */ -public class AcePanelApiExample { - - public static void main(String[] args) { - try { - // 示例请求 - String apiUrl = "http://example.com/entrance/api/user/info"; - String method = "GET"; - String body = ""; // 对于GET请求,通常没有请求体 - int id = 16; - String token = "YourSecretToken"; - - // 生成签名信息 - SigningData signingData = signRequest(method, apiUrl, body, id, token); - - // 准备HTTP请求 - HttpClient client = HttpClient.newHttpClient(); - HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() - .uri(URI.create(apiUrl)) - .header("Content-Type", "application/json") - .header("X-Timestamp", String.valueOf(signingData.timestamp)) - .header("Authorization", "HMAC-SHA256 Credential=" + signingData.id + - ", Signature=" + signingData.signature); - - // 设置请求方法和请求体 - if (method.equals("GET")) { - requestBuilder.GET(); - } else { - requestBuilder.method(method, HttpRequest.BodyPublishers.ofString(body)); - } - - HttpRequest request = requestBuilder.build(); - - // 发送请求 - HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); - - // 输出结果 - System.out.println("响应状态码: " + response.statusCode()); - System.out.println("响应内容: " + response.body()); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - static class SigningData { - long timestamp; - String signature; - int id; - - SigningData(long timestamp, String signature, int id) { - this.timestamp = timestamp; - this.signature = signature; - this.id = id; - } - } - - public static SigningData signRequest(String method, String url, String body, int id, String token) throws Exception { - // 解析URL - URI uri = new URI(url); - String path = uri.getPath(); - String query = uri.getQuery() != null ? uri.getQuery() : ""; - - // 规范化路径 - String canonicalPath = path; - if (!path.startsWith("/api")) { - int apiPos = path.indexOf("/api"); - if (apiPos != -1) { - canonicalPath = path.substring(apiPos); - } - } - - // 计算请求体的SHA256哈希值 - String bodySha256 = sha256Hash(body != null ? body : ""); - - // 构造规范化请求 - String canonicalRequest = String.join("\n", - method, - canonicalPath, - query, - bodySha256); - - // 获取当前时间戳 - long timestamp = Instant.now().getEpochSecond(); - - // 构造待签名字符串 - String stringToSign = String.join("\n", - "HMAC-SHA256", - String.valueOf(timestamp), - sha256Hash(canonicalRequest)); - - // 计算签名 - String signature = hmacSha256(token, stringToSign); - - // 返回签名和时间戳 - return new SigningData(timestamp, signature, id); - } - - private static String sha256Hash(String text) throws Exception { - MessageDigest digest = MessageDigest.getInstance("SHA-256"); - byte[] hash = digest.digest(text.getBytes(StandardCharsets.UTF_8)); - return bytesToHex(hash); - } - - private static String hmacSha256(String key, String message) throws Exception { - Mac mac = Mac.getInstance("HmacSHA256"); - SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256"); - mac.init(secretKeySpec); - byte[] hash = mac.doFinal(message.getBytes(StandardCharsets.UTF_8)); - return bytesToHex(hash); - } - - private static String bytesToHex(byte[] bytes) { - StringBuilder hexString = new StringBuilder(); - for (byte b : bytes) { - String hex = Integer.toHexString(0xff & b); - if (hex.length() == 1) { - hexString.append('0'); - } - hexString.append(hex); - } - return hexString.toString(); - } -} -``` - -## Node.js 示例 - -```javascript -const crypto = require('crypto'); -const axios = require('axios'); -const url = require('url'); - -/** - * 计算字符串的SHA256哈希值 - * @param {string} text 待哈希的字符串 - * @returns {string} 哈希结果(十六进制) - */ -function sha256Hash(text) { - return crypto.createHash('sha256').update(text || '').digest('hex'); -} - -/** - * 使用HMAC-SHA256算法计算签名 - * @param {string} key 密钥 - * @param {string} message 待签名的消息 - * @returns {string} 签名结果(十六进制) - */ -function hmacSha256(key, message) { - return crypto.createHmac('sha256', key).update(message).digest('hex'); -} - -/** - * 为API请求生成签名 - * @param {string} method HTTP方法 - * @param {string} apiUrl API地址 - * @param {string} body 请求体 - * @param {number} id 用户ID - * @param {string} token 密钥 - * @returns {object} 包含签名、时间戳和ID的对象 - */ -function signRequest(method, apiUrl, body, id, token) { - // 解析URL - const parsedUrl = new url.URL(apiUrl); - const path = parsedUrl.pathname; - const query = parsedUrl.search.slice(1); // 移除开头的'?' - - // 规范化路径 - let canonicalPath = path; - if (!path.startsWith('/api')) { - const apiPos = path.indexOf('/api'); - if (apiPos !== -1) { - canonicalPath = path.slice(apiPos); - } - } - - // 构造规范化请求 - const canonicalRequest = [ - method, - canonicalPath, - query, - sha256Hash(body || '') - ].join('\n'); - - // 获取当前时间戳 - const timestamp = Math.floor(Date.now() / 1000); - - // 构造待签名字符串 - const stringToSign = [ - 'HMAC-SHA256', - timestamp, - sha256Hash(canonicalRequest) - ].join('\n'); - - // 计算签名 - const signature = hmacSha256(token, stringToSign); - - return { - timestamp, - signature, - id - }; -} - -/** - * 发送API请求 - */ -async function sendApiRequest() { - // 示例请求参数 - const apiUrl = 'http://example.com/entrance/api/user/info'; - const method = 'GET'; - const body = ''; // GET请求通常没有请求体 - const id = 16; - const token = 'YourSecretToken'; - - try { - // 生成签名信息 - const signingData = signRequest(method, apiUrl, body, id, token); - - // 准备HTTP请求头 - const headers = { - 'Content-Type': 'application/json', - 'X-Timestamp': signingData.timestamp, - 'Authorization': `HMAC-SHA256 Credential=${signingData.id}, Signature=${signingData.signature}` - }; - - // 发送请求 - const response = await axios({ - method, - url: apiUrl, - headers, - data: body || undefined - }); - - // 输出结果 - console.log(`响应状态码: ${response.status}`); - console.log(`响应内容: ${JSON.stringify(response.data)}`); - - } catch (error) { - console.error('请求出错:', error.message); - if (error.response) { - console.error(`响应状态码: ${error.response.status}`); - console.error(`响应内容: ${JSON.stringify(error.response.data)}`); - } - } -} - -// 执行请求 -sendApiRequest(); -``` - -## 常见响应码 - -| HTTP 状态码 | 描述 | -| -------- | ------- | -| 200 | 请求成功 | -| 401 | 身份验证失败 | -| 403 | 权限不足 | -| 404 | 资源不存在 | -| 422 | 请求参数错误 | -| 500 | 服务器内部错误 | - -## 安全建议 - -1. **保护您的 API 令牌**:不要在客户端代码中硬编码或公开您的 API 令牌 -2. **定期轮换令牌**:定期更改您的 API 令牌以提高安全性 -3. **配置 IP 白名单**:在生产环境中使用 IP 白名单限制访问 - -## 常见问题解答 - -### 签名验证失败 - -如果遇到签名验证失败,请检查: - -- 确保使用了正确的 API 令牌和 ID -- 检查客户端与服务器的时间是否准确,时间戳偏差大于 300 秒会导致验证失败 -- 确保请求体在计算签名前后没有被修改 -- 确保 URL 路径处理正确,注意规范化路径时需要移除入口前缀 - -### 请求超时 - -- 检查网络连接 -- 确认服务器状态 -- 考虑增加客户端的超时设置 diff --git a/zh_CN/advanced/faq.md b/zh_CN/advanced/faq.md deleted file mode 100644 index 20eb983..0000000 --- a/zh_CN/advanced/faq.md +++ /dev/null @@ -1,80 +0,0 @@ -# 常见问题 - -以下是关于 AcePanel 的一些常见问题和解答。 如果您有任何其他问题,请随时在 [AcePanel 论坛](https://tom.moe/c/technical/acepanel)提问。 如果您发现任何 Bugs,请提交一个 [GitHub Issue](https://github.com/acepanel/panel/issues)。 - -## 配置 QUIC(HTTP3) - -面板目前已支持自动 QUIC 配置,但是出于兼容性考虑,默认未添加 `Alt-Svc` 标头。 浏览器在未检测到 `Alt-Svc` 标头时不会尝试使用 QUIC 连接。 - -如果你不使用 CDN,可添加下述配置到网站伪静态中即可让浏览器知晓网站支持并使用 QUIC 连接。 - -```nginx -add_header Alt-Svc 'h3=":$server_port"; ma=2592000'; -``` - -如果你使用 CDN 或者前端还存在代理服务器,则 QUIC 需要在 CDN / 前端开启。 - -如果配置后仍不生效,请检查浏览器版本和 UDP 443 端口的可用性。 - -- 根据 Nginx 的 git 提交记录,1.25 版本下所有 QUIC 草案版本已经移除,因此 `Alt-Svc` 无需添加草案版本号。 - -## 配置 TLSv1.1 TLSv1 - -当前面板 OpenResty 使用 OpenSSL 3.5 版本编译,默认禁用已弃用的 TLSv1.1 TLSv1 协议。 - -当然,如果你的业务必须要使用这两个协议的话,可以使用下述 SSL 配置启用。 - -```nginx -ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; -ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:@SECLEVEL=0; -ssl_prefer_server_ciphers on; -``` - -## 配置反向代理 - -面板 v2.4.10+ 自带反向代理配置生成器,你可以通过站点伪静态配置页面的右上角打开使用。 - -注意:如果设置反向代理后出现 CSS/JS 等静态资源无法正常加载的问题,请移除站点主配置文件中的**不记录静态文件日志**部分。 - -## 配置进程守护 - -1. 安装 Supervisor 管理器并打开。 -2. Supervisor 管理器中创建需要守护的进程(运行用户不建议使用 root)。 -3. 常见问题:[https://tom.moe/t/supervisor/3112](https://tom.moe/t/supervisor/3112) - -## 配置 IPv6 - -如果您想要启用 IPv6 支持,您需要将 `[::]:80` 和 `[:]:443` 添加到网站的监听地址配置。 - -## 配置容器镜像加速 - -由于一些原因国内可能无法连接到 Docker Hub 拉取容器镜像,因此需要配置镜像加速。 - -### 对于 Podman - -在面板打开 Podman 设置页面,导航到注册表配置选项卡。 - -滚动到配置文件底部,添加如下配置并保存: - -``` -[[registry]] -location = "docker.io" -[[registry.mirror]] -location = "docker.1ms.run" -``` - -其中 docker.1ms.run 为配置的镜像加速地址。 可自行参考其他教程搭建使用。 - -### 对于 Docker - -在面板打开 Docker 设置页面,导航到配置选项卡。 - -添加如下配置并保存: - -```json -{ - "registry-mirrors": ["https://docker.1ms.run"] -} -``` - -其中 docker.1ms.run 为配置的镜像加速地址。 可自行参考其他教程搭建使用。 diff --git a/zh_CN/advanced/safe.md b/zh_CN/advanced/safe.md deleted file mode 100644 index 6b7eb70..0000000 --- a/zh_CN/advanced/safe.md +++ /dev/null @@ -1,32 +0,0 @@ -# 安全性建议 - -通过以下安全措施,几乎可以杜绝一切被黑/挂马问题。 - -### 网站方面 - -根据以往经验大多数被黑挂马都是程序漏洞造成的,与面板等环境无关。 为了网站安全,你应该做到: - -1. 不要使用盗版程序、软件,特别是在你无法确定有没有被人加过料的情况下。 -2. 定期更新网站程序和软件环境,不要怕麻烦使用过时的软件程序,它们的安全性无法保证。 -3. 网站后台禁止使用弱密码。 密码强烈建议使用随机生成器生成大于 20 位的混合密码并保存在安全位置。 有条件建议开启程序的两步验证(2FA)。 -4. 设置定时备份全站数据,不要裸奔。 -5. PHP 默认禁用了部分高危函数,非必要请勿删除。 - -### 系统方面 - -现代系统出现严重安全漏洞的概率是很低的,但是你仍应该做到: - -1. 定期更新系统软件。 (使用 `yum update` 或 `apt upgrade`)。 -2. SSH 禁止使用弱密码和默认 22 端口。 密码强烈建议使用随机生成器生成大于 20 位的混合密码并保存在安全位置。 如果可以建议安装 Fail2ban 针对性保护。 -3. 不要随意给 777 权限和 www 用户的执行权限,可能造成极大安全隐患。 -4. 如果运营商提供 VNC 管理服务器,也可以考虑关闭 SSH,从源头上解决问题。 - -### 面板方面 - -面板拥有和 root 一样的权限,管理不当亦会造成严重安全问题。 你应该做到: 你应该做到: - -1. 定期更新面板及面板安装的应用。 同时推荐关注我们的频道或者群,以第一时间接收各类更新消息。 -2. 面板禁止使用弱密码和默认 8888 端口。 密码强烈建议使用随机生成器生成大于 20 位的混合密码并保存在安全位置。 -3. 建议修改添加面板入口和开启面板 HTTPS,防止被扫描器扫描和中间人攻击。 -4. 防火墙无必要请不要放行内部服务的端口(Redis 6379、MySQL 3306、PostgreSQL 5432等),可能造成严重安全隐患。 (网站本地连接不需要放行,连不上是程序的问题)。 -5. 对安全性要求较高的情况下,可以考虑日常停止面板的运行,按需启动(面板停止运行不会影响网站、计划任务等的运行)。 diff --git a/zh_CN/cert.md b/zh_CN/cert.md deleted file mode 100644 index 46f4566..0000000 --- a/zh_CN/cert.md +++ /dev/null @@ -1,202 +0,0 @@ ---- -sidebar: false -prev: false -next: false ---- - -# 证书 - -若 3 个月免费证书无法满足您的需求,您可以选择购买更高级别的证书。 我们提供 DV 单域名证书和 DV 通配符证书可供选择。 - -受限价政策,具体价格及购买请直接通过右上角加群联系销售。 - - - -## 选购证书 - -
-
-
-

DV 单域名证书

-
-
国际知名品牌证书
-
¥ 1X/年
-
-
- 域名型证书(DV) -
-
- 支持一个域名 -
-
- 一年有效期 -
-
- 快速颁发 -
-
-
-
-
-

DV 通配符证书

-
-
国际知名品牌证书
-
¥ 1XX/年
-
-
- 域名型证书(DV) -
-
- 通配所有子域 -
-
- 一年有效期 -
-
- 快速颁发 -
-
-
-
- -## 证书特点 - -
-
-
-
🛡️
-
-

安全可靠

-

采用国际标准,保护网站安全

-
-
-
-
-
-

快速签发

-

简化签发流程,快速颁发证书

-
-
-
-
💳
-
-

灵活付费

-

多种规格可选,满足不同需求

-
-
-
-
👨‍💻
-
-

专业服务

-

专业技术支持,保障使用无忧

-
-
-
-
diff --git a/zh_CN/index.md b/zh_CN/index.md deleted file mode 100644 index ea237e5..0000000 --- a/zh_CN/index.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -layout: home -hero: - name: "AcePanel" - text: "简单轻量 • 高效运维" - tagline: 全能服务器运维管理面板 - actions: - - theme: brand - text: 🌟 点亮 Star - link: https://github.com/acepanel/panel - target: _blank - - theme: alt - text: 快速安装 - link: /quickstart/install -features: - - icon: ✨ - title: 极低占用 - details: Go 语言开发,安装包小,占用低,单文件运行,不会对系统性能造成影响 - - icon: 🛠 - title: 低破坏性 - details: 设计为尽可能减少对系统的额外修改,在同类产品中,我们对系统的修改最少 - - icon: 📅 - title: 追随时代 - details: 整体设计走在时代前沿,对新系统兼容性好,在同类产品中处于领先地位 - - icon: 🚀 - title: 高效运维 - details: 功能完善,自定义能力强,既可快速部署小型网站,也可基于定制化需求部署复杂应用 - - icon: ⛓️‍💥 - title: 离线运行 - details: 支持离线模式,甚至可以在部署完成后停止面板进程,不会对已有服务造成任何影响 - - icon: 🛡 - title: 安全稳定 - details: 面板采用业界多种技术保障本体安全性,已在我们的多个生产环境中长期稳定运行 - - icon: 💽 - title: 全面开源 - details: 少有的全开源面板,您可以在遵守开源协议的前提下对面板自由修改、二次开发 - - icon: 🆓 - title: 永久免费 - details: 承诺面板本体未来不会引入任何收费/授权功能,永久免费使用 ---- - -## 合作伙伴 - - diff --git a/zh_CN/quickstart/container.md b/zh_CN/quickstart/container.md deleted file mode 100644 index da3283b..0000000 --- a/zh_CN/quickstart/container.md +++ /dev/null @@ -1,25 +0,0 @@ -# 管理容器 - -开始前需安装 Docker / Podman 容器引擎。 - -容器引擎安装完毕后,即可前往面板容器管理处创建容器(此处以 pgadmin4 为例)。 - -首先导航到镜像选项卡拉取需要的镜像。 视网络环境可能需要数分钟到数十分钟。 - -![拉取镜像](/images/container/container1.png) - -镜像拉取完成后,导航到容器选项卡开始创建容器。 - -![创建容器](/images/container/container2.png) - -表单内容按容器的说明填写。 此处使用的 pgadmin4 镜像需要映射 80 端口及配置 2 个默认环境变量,无需映射目录。 - -容器创建完成后可点击右上角刷新按钮和容器右侧的日志按钮检查是否正常启动。 - -![容器启动](/images/container/container3.png) - -若容器未能启动,请根据日志进行修正。 - -如果映射了外部端口,需要到防火墙菜单放行相应的端口。 - -![创建成功](/images/container/container4.png) diff --git a/zh_CN/quickstart/disk.md b/zh_CN/quickstart/disk.md deleted file mode 100644 index 504b119..0000000 --- a/zh_CN/quickstart/disk.md +++ /dev/null @@ -1,9 +0,0 @@ -# 挂载分区 - -如果您的服务器有未挂载的数据盘,可在安装前以 root 用户登录服务器运行以下命令自动挂载。 面板安装后不支持跨目录迁移。 - -```shell -curl -fsLm 10 -o auto_mount.sh https://dl.cdn.haozi.net/panel/auto_mount.sh && bash auto_mount.sh -``` - -也可工单联系服务器提供商要求协助挂载分区,或者自行挂载分区后再安装面板。 diff --git a/zh_CN/quickstart/install.md b/zh_CN/quickstart/install.md deleted file mode 100644 index ff9bb30..0000000 --- a/zh_CN/quickstart/install.md +++ /dev/null @@ -1,38 +0,0 @@ -# 安装面板 - -AcePanel 支持最新的两个稳定版本的主流 `amd64` 和 `arm64` 架构系统。 在下面的表格中列出的所有系统上均已测试 LNMP 环境的安装。 - -建议使用标注为**推荐**的系统。 无特殊情况不建议使用标注**不推荐**的系统。 - -不在下表中的其他系统,可自行尝试安装,但不提供无偿技术支持。 - -| 系统 | 版本 | 备注 | -| ---------------- | -- | --- | -| AlmaLinux | 10 | 推荐 | -| AlmaLinux | 9 | 支持 | -| RockyLinux | 10 | 推荐 | -| RockyLinux | 9 | 支持 | -| CentOS Stream | 10 | 不推荐 | -| CentOS Stream | 9 | 不推荐 | -| Ubuntu | 24 | 推荐 | -| Ubuntu | 22 | 支持 | -| Debian | 13 | 推荐 | -| Debian | 12 | 支持 | -| OpenCloudOS | 9 | 支持 | -| TencentOS Server | 4 | 支持 | - -随着系统版本的不断更新,我们亦可能会终止部分过于老旧的系统的支持,以保证面板的健壮性。 - -## 开始安装 - -> 如需挂载分区,请在安装面板前完成。 在面板安装后不支持目录迁移。 - -**AcePanel 推荐使用 [林枫云高性能 AMD EYPC 服务器](https://www.dkdun.cn/aff/MQZZNVHQ) 进行安装。** - -以 `root` 用户登录服务器,运行以下命令安装面板: - -```shell -bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh) -``` - -一般 2 分钟内即可完成安装。 安装过程中请勿关闭终端。 diff --git a/zh_CN/quickstart/panel.md b/zh_CN/quickstart/panel.md deleted file mode 100644 index 1432c06..0000000 --- a/zh_CN/quickstart/panel.md +++ /dev/null @@ -1,35 +0,0 @@ -# 管理面板 - -请勿在面板仍有任务运行时操作停止 / 重启面板,否则可能会造成问题。 - -- 启动面板:`acepanel start` -- 停止面板:`acepanel stop` -- 重启面板:`acepanel restart` - -## 面板命令行 - -```bash -acepanel -``` - -可根据提示补全需要的命令进行操作。 - -例如,要更改用户的密码,您可以使用: - -```bash -acepanel user password haozi 123456 -``` - -这将把用户 `haozi` 的密码更改为 `123456`。 - -## 卸载面板 - -优先建议备份数据重装系统,这样可以保证系统纯净。 - -如果您无法重装系统,请以`root`用户登录服务器,执行以下命令卸载面板: - -```shell -bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh) -``` - -卸载面板前请务必备份好所有数据,提前卸载面板全部应用。 卸载后数据将**无法恢复**! diff --git a/zh_CN/support.md b/zh_CN/support.md deleted file mode 100644 index 8d5296b..0000000 --- a/zh_CN/support.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar: false -prev: false -next: false ---- - -# 支持 - -## 免费论坛服务 - -我们提供免费的论坛服务,您可以在论坛中提问、交流、分享面板使用中的问题。 - -- [Moe Tom](https://tom.moe/c/technical/acepanel) - -## 付费远程服务 - -网站报错、速度慢、被挂马? 服务器资源占用高、配置调优、入侵朔源? 我们统统一站式服务。 - -### 远程服务价格表 - -远程服务是指我们通过远程协助的方式,帮助您解决问题。 - -| 名称 | 介绍 | 价格 | -| ---- | ---------------- | ----- | -| 单次服务 | 仅限一次服务,问题解决服务即结束 | ¥50 起 | - -### 服务流程 - -1. 提前联系我们,说明问题 -2. 我们评估问题,确认是否可以解决及给出预估价格 -3. 您确认价格后,支付 50% 预付款,服务开始 -4. 服务完成后,您确认无误并支付剩余款项 - -## 联系我们 - -- [企业微信](https://work.weixin.qq.com/kfid/kfc20ea8e38b5a4e73a) -- [QQ 826896000](https://wpa.qq.com/msgrd?v=3&uin=826896000&site=qq&menu=yes) diff --git a/zh_CN/version-[version].md b/zh_CN/version-[version].md deleted file mode 100644 index 359bfd5..0000000 --- a/zh_CN/version-[version].md +++ /dev/null @@ -1,8 +0,0 @@ -# v{{ $params.version }} - -- 版本类型:{{ $params.type == 'stable' ? '稳定版' : '测试版' }} -- 发布时间:{{ $params.time }} - -## 更新内容 - - diff --git a/zh_CN/version-[version].paths.ts b/zh_CN/version-[version].paths.ts deleted file mode 100644 index a61be8b..0000000 --- a/zh_CN/version-[version].paths.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - async paths() { - const resp = await (await fetch('https://api.acepanel.net/versions?locale=zh_CN')).json() - if (!resp.message || resp.message !== 'success') return [] - - return resp.data.slice(0, 10).map((item: any) => { - return { - params: { - version: item.version, - type: item.type, - time: item.updated_at.replace('T', ' ').slice(0, 19) - }, - content: item.description - } - }) - } -} \ No newline at end of file diff --git a/zh_TW/about.md b/zh_TW/about.md deleted file mode 100644 index 7272352..0000000 --- a/zh_TW/about.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -sidebar: false -prev: false -next: false ---- - - - -# 關於 - -AcePanel is a professional server operation and maintenance management panel dedicated to providing users with simple, -efficient, and secure server management solutions. - -| 願景 | 使命 | 價值觀 | -| ----------------- | ------------- | -------------- | -| 成為領先的伺服器管理解決方案提供商 | 讓伺服器管理變得簡單而高效 | 用戶至上、創新驅動、專業專注 | - -## 團隊介紹 - - - -## 發展歷程 - -:::timeline 2026 - 3.0 Era -In 2026, We launched the highly anticipated version 3.0, introducing a revamped user interface and advanced features -::: - -:::timeline 2025 - Steady Progress -In 2025, We focused on optimizing user experience and enhancing system stability, releasing versions 2.4 series -::: - -:::timeline 2024 - 全新起航 -面板得到了眾多贊助商的支持,2024 年下半年發佈了全新的 2.3 版本 -::: - -:::timeline 2023 - 技術積累 -使用 Go 對面板進行重寫,發佈 2.0 2.1 系列版本,積累了大量開發經驗 -::: - -:::timeline 2022 - 項目立項 -2022 年中項目立項,年末發佈 1.0 版本 -::: - -## 聯繫我們 - -| 名稱 | 聯繫方式 | -| ---- | ------------------------------------------------------------------------------------------ | -| 企業微信 | [點擊聯繫](https://work.weixin.qq.com/kfid/kfc20ea8e38b5a4e73a) | -| QQ | [826896000](https://wpa.qq.com/msgrd?v=3&uin=826896000&site=qq&menu=yes) | -| 電子郵件 | [haozi@loli.email](mailto:haozi@loli.email) | -| 公司地址 | 天津市武清區黃莊街道泉里路1號智庫大廈206室 | diff --git a/zh_TW/advanced/api.md b/zh_TW/advanced/api.md deleted file mode 100644 index c850284..0000000 --- a/zh_TW/advanced/api.md +++ /dev/null @@ -1,661 +0,0 @@ -# API 參考文檔 - -## 概述 - -AcePanel 提供了安全的 RESTful 接口,用於與面板系統進行互動。 所有 API 請求都需要進行 HMAC-SHA256 簽名認證以確保通訊的安全性和完整性。 - -## 基本信息 - - - **基本 URL**: `http(s)://your-panel-domain/{entry}/api/` - - **內容類型**: 所有請求和響應均使用 `application/json` - - **字符編碼**: UTF-8 - -## 身份驗證機制 - -API 使用 HMAC-SHA256 簽名算法進行身份認證。 每個請求必須包含以下 HTTP 標頭: - -| 標頭名稱 | 描述 | -| --------------- | --------------------------------------------------------------- | -| `Content-Type` | 設置為 `application/json` | -| `X-Timestamp` | 當前 UNIX 時間戳(秒) | -| `Authorization` | 身份認證信息,格式為 `HMAC-SHA256 Credential={id}, Signature={signature}` | - -## 簽名算法 - -簽名過程包含四個主要步驟: - -### 1. 構造規範化請求 - -規範化請求字符串由以下部分組成,各部分之間使用換行符(\n)分隔: - -``` -HTTP 方法 -規範化路徑 -規範化查詢字符串 -請求體的 SHA256 哈希值 -``` - -**注意**:規範化路徑應始終使用 `/api/` 開頭的路徑部分,忽略入口前綴。 - -### 2. 構造待簽名字符串 - -待簽名字符串包含以下部分,各部分使用換行符(\n)分隔: - -``` -"HMAC-SHA256" -時間戳 -規範化請求的 SHA256 哈希值 -``` - -### 3. 計算簽名 - -使用您的令牌(token)對待簽名字符串進行 HMAC-SHA256 計算,然後將結果轉換為十六進制字符串。 - -### 4. 構造授權頭 - -將計算得到的簽名添加到 `Authorization` 頭: - -``` -授權: HMAC-SHA256 Credential={id}, Signature={signature} -``` - -## Go 範例 - -```go -package main - -import ( - "bytes" - "crypto/hmac" - "crypto/sha256" - "encoding/hex" - "fmt" - "io" - "net/http" - "strings" - "time" -) - -func main() { - // 創建一個獲取用戶信息的請求 - req, err := http.NewRequest("GET", "http://example.com/entrance/api/user/info", nil) - if err != nil { - fmt.Println("創建請求時出錯:", err) - return - } - - // 設置內容類型 - req.Header.Set("Content-Type", "application/json") - - // 簽名請求 - 傳入您的用戶 ID 和 API 令牌 - if err = SignReq(req, uint(16), "YourSecretToken"); err != nil { - fmt.Println("簽名請求時出錯:", err) - return - } - - // 發送請求 - client := &http.Client{} - resp, err := client.Do(req) - if err != nil { - fmt.Println("發送請求時出錯:", err) - return - } - defer resp.Body.Close() - - // 處理響應 - body, err := io.ReadAll(resp.Body) - if err != nil { - fmt.Println("讀取響應時出錯:", err) - return - } - - fmt.Println("響應狀態:", resp.Status) - fmt.Println("響應內容:", string(body)) -} - -// SignReq 對 HTTP 請求進行簽名 -func SignReq(req *http.Request, id uint, token string) error { - // 步驟 1:構造規範化請求 - var body []byte - var err error - - if req.Body != nil { - // 讀取並保存請求體 - body, err = io.ReadAll(req.Body) - if err != nil { - return err - } - // 恢復請求體以便後續使用 - req.Body = io.NopCloser(bytes.NewReader(body)) - } - - // 規範化路徑 - canonicalPath := req.URL.Path - if !strings.HasPrefix(canonicalPath, "/api") { - index := strings.Index(canonicalPath, "/api") - if index != -1 { - canonicalPath = canonicalPath[index:] - } - } - - canonicalRequest := fmt.Sprintf("%s\n%s\n%s\n%s", - req.Method, - canonicalPath, - req.URL.Query().Encode(), - SHA256(string(body))) - - // 步驟 2:設置時間戳並構造待簽名字符串 - timestamp := time.Now().Unix() - req.Header.Set("X-Timestamp", fmt.Sprintf("%d", timestamp)) - - stringToSign := fmt.Sprintf("%s\n%d\n%s", - "HMAC-SHA256", - timestamp, - SHA256(canonicalRequest)) - - // 步驟 3:計算簽名 - signature := HMACSHA256(stringToSign, token) - - // 步驟 4:設置 Authorization 頭 - authHeader := fmt.Sprintf("HMAC-SHA256 Credential=%d, Signature=%s", id, signature) - req.Header.Set("Authorization", authHeader) - - return nil -} - -func SHA256(str string) string { - sum := sha256.Sum256([]byte(str)) - dst := make([]byte, hex.EncodedLen(len(sum))) - hex.Encode(dst, sum[:]) - return string(dst) -} - -func HMACSHA256(data string, secret string) string { - h := hmac.New(sha256.New, []byte(secret)) - h.Write([]byte(data)) - return hex.EncodeToString(h.Sum(nil)) -} -``` - -## PHP 範例 - -```php - $timestamp, - 'signature' => $signature, - 'id' => $id - ]; -} - -// Example request -$apiUrl = 'http://example.com/entrance/api/user/info'; -$method = 'GET'; -$body = ''; // For GET requests, usually no request body -$id = 16; -$token = 'YourSecretToken'; - -// Generate signature information -$signingData = signRequest($method, $apiUrl, $body, $id, $token); - -// Prepare HTTP headers -$headers = [ - 'Content-Type: application/json', - 'X-Timestamp: ' . $signingData['timestamp'], - 'Authorization: HMAC-SHA256 Credential=' . $signingData['id'] . ', Signature=' . $signingData['signature'] -]; - -// Use cURL to send request -$ch = curl_init($apiUrl); -curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); -curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); -curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); - -if (!empty($body)) { - curl_setopt($ch, CURLOPT_POSTFIELDS, $body); -} - -// Execute request and get response -$response = curl_exec($ch); -$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); -curl_close($ch); - -// Output results -echo "Response Status Code: " . $statusCode . PHP_EOL; -echo "Response Content: " . $response . PHP_EOL; -``` - -## Python 範例 - -```python -import hashlib -import hmac -import json -import requests -import time -from urllib.parse import urlparse, parse_qs - -def sha256_hash(text): - """計算字符串的 SHA256 哈希值""" - return hashlib.sha256(text.encode('utf-8')).hexdigest() - -def hmac_sha256(key, message): - """使用 HMAC-SHA256 算法計算簽名""" - return hmac.new(key.encode('utf-8'), message.encode('utf-8'), hashlib.sha256).hexdigest() - -def sign_request(method, url, body, user_id, token): - """為 API 請求生成簽名""" - # 解析 URL - parsed_url = urlparse(url) - path = parsed_url.path - query = parsed_url.query - - # 規範化路徑 - canonical_path = path - if not path.startswith('/api'): - api_pos = path.find('/api') - if api_pos != -1: - canonical_path = path[api_pos:] - - # 構造規範化請求 - body_str = body if body else "" - canonical_request = "\n".join([ - method, - canonical_path, - query, - sha256_hash(body_str) - ]) - - # 獲取當前時間戳 - timestamp = int(time.time()) - - # 構造待簽名字符串 - string_to_sign = "\n".join([ - "HMAC-SHA256", - str(timestamp), - sha256_hash(canonical_request) - ]) - - # 計算簽名 - signature = hmac_sha256(token, string_to_sign) - - return { - "timestamp": timestamp, - "signature": signature, - "id": user_id - } - -# 範例請求 -api_url = "http://example.com/entrance/api/user/info" -method = "GET" -body = "" # GET 請求通常沒有請求主體 -user_id = 16 -token = "您的秘密令牌" - -# 生成簽名信息 -signing_data = sign_request(method, api_url, body, user_id, token) - -# 準備 HTTP 標頭 -headers = { - "Content-Type": "application/json", - "X-Timestamp": str(signing_data["timestamp"]), - "Authorization": f"HMAC-SHA256 Credential={signing_data['id']}, Signature={signing_data['signature']}" -} - -# 發送請求 -response = requests.request( - method=method, - url=api_url, - headers=headers, - data=body -) - -# 輸出結果 -print(f"響應狀態碼: {response.status_code}") -print(f"響應內容: {response.text}") -``` - -## Java 範例 - -```java -import java.net.URI; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.security.MessageDigest; -import java.time.Instant; -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; -import java.util.Base64; - -/** - * AcePanel API Request Example (Java) - */ -public class AcePanelApiExample { - - public static void main(String[] args) { - try { - // Example request - String apiUrl = "http://example.com/entrance/api/user/info"; - String method = "GET"; - String body = ""; // For GET requests, usually no request body - int id = 16; - String token = "YourSecretToken"; - - // Generate signature information - SigningData signingData = signRequest(method, apiUrl, body, id, token); - - // Prepare HTTP request - HttpClient client = HttpClient.newHttpClient(); - HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() - .uri(URI.create(apiUrl)) - .header("Content-Type", "application/json") - .header("X-Timestamp", String.valueOf(signingData.timestamp)) - .header("Authorization", "HMAC-SHA256 Credential=" + signingData.id + - ", Signature=" + signingData.signature); - - // Set request method and body - if (method.equals("GET")) { - requestBuilder.GET(); - } else { - requestBuilder.method(method, HttpRequest.BodyPublishers.ofString(body)); - } - - HttpRequest request = requestBuilder.build(); - - // Send request - HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); - - // Output results - System.out.println("Response Status Code: " + response.statusCode()); - System.out.println("Response Content: " + response.body()); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - static class SigningData { - long timestamp; - String signature; - int id; - - SigningData(long timestamp, String signature, int id) { - this.timestamp = timestamp; - this.signature = signature; - this.id = id; - } - } - - public static SigningData signRequest(String method, String url, String body, int id, String token) throws Exception { - // Parse URL - URI uri = new URI(url); - String path = uri.getPath(); - String query = uri.getQuery() != null ? uri.getQuery() : ""; - - // Canonical path - String canonicalPath = path; - if (!path.startsWith("/api")) { - int apiPos = path.indexOf("/api"); - if (apiPos != -1) { - canonicalPath = path.substring(apiPos); - } - } - - // Calculate SHA256 hash of request body - String bodySha256 = sha256Hash(body != null ? body : ""); - - // Construct canonical request - String canonicalRequest = String.join("\n", - method, - canonicalPath, - query, - bodySha256); - - // Get current timestamp - long timestamp = Instant.now().getEpochSecond(); - - // Construct string to sign - String stringToSign = String.join("\n", - "HMAC-SHA256", - String.valueOf(timestamp), - sha256Hash(canonicalRequest)); - - // Calculate signature - String signature = hmacSha256(token, stringToSign); - - // Return signature and timestamp - return new SigningData(timestamp, signature, id); - } - - private static String sha256Hash(String text) throws Exception { - MessageDigest digest = MessageDigest.getInstance("SHA-256"); - byte[] hash = digest.digest(text.getBytes(StandardCharsets.UTF_8)); - return bytesToHex(hash); - } - - private static String hmacSha256(String key, String message) throws Exception { - Mac mac = Mac.getInstance("HmacSHA256"); - SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256"); - mac.init(secretKeySpec); - byte[] hash = mac.doFinal(message.getBytes(StandardCharsets.UTF_8)); - return bytesToHex(hash); - } - - private static String bytesToHex(byte[] bytes) { - StringBuilder hexString = new StringBuilder(); - for (byte b : bytes) { - String hex = Integer.toHexString(0xff & b); - if (hex.length() == 1) { - hexString.append('0'); - } - hexString.append(hex); - } - return hexString.toString(); - } -} -``` - -## Node.js 範例 - -```javascript -const crypto = require('crypto'); -const axios = require('axios'); -const url = require('url'); - -/** - * 計算字符串的 SHA256 哈希值 - * @param {string} text 待哈希的字符串 - * @returns {string} 哈希結果(十六進制) - */ -function sha256Hash(text) { - return crypto.createHash('sha256').update(text || '').digest('hex'); -} - -/** - * 使用 HMAC-SHA256 算法計算簽名 - * @param {string} key 密鑰 - * @param {string} message 待簽名的消息 - * @returns {string} 簽名結果(十六進制) - */ -function hmacSha256(key, message) { - return crypto.createHmac('sha256', key).update(message).digest('hex'); -} - -/** - * 為 API 請求生成簽名 - * @param {string} method HTTP 方法 - * @param {string} apiUrl API 地址 - * @param {string} body 請求體 - * @param {number} id 用戶 ID - * @param {string} token 密鑰 - * @returns {object} 包含簽名、時間戳和 ID 的對象 - */ -function signRequest(method, apiUrl, body, id, token) { - // 解析 URL - const parsedUrl = new url.URL(apiUrl); - const path = parsedUrl.pathname; - const query = parsedUrl.search.slice(1); // 移除開頭的 '?' - - // 規範化路徑 - let canonicalPath = path; - if (!path.startsWith('/api')) { - const apiPos = path.indexOf('/api'); - if (apiPos !== -1) { - canonicalPath = path.slice(apiPos); - } - } - - // 構造規範化請求 - const canonicalRequest = [ - method, - canonicalPath, - query, - sha256Hash(body || '') - ].join('\n'); - - // 獲取當前時間戳 - const timestamp = Math.floor(Date.now() / 1000); - - // 構造待簽名字符串 - const stringToSign = [ - 'HMAC-SHA256', - timestamp, - sha256Hash(canonicalRequest) - ].join('\n'); - - // 計算簽名 - const signature = hmacSha256(token, stringToSign); - - return { - timestamp, - signature, - id - }; -} - -/** - * 發送 API 請求 - */ -async function sendApiRequest() { - // 範例請求參數 - const apiUrl = 'http://example.com/entrance/api/user/info'; - const method = 'GET'; - const body = ''; // GET 請求通常沒有請求體 - const id = 16; - const token = '您的秘密令牌'; - - try { - // 生成簽名信息 - const signingData = signRequest(method, apiUrl, body, id, token); - - // 準備 HTTP 標頭 - const headers = { - 'Content-Type': 'application/json', - 'X-Timestamp': signingData.timestamp, - 'Authorization': `HMAC-SHA256 Credential=${signingData.id}, Signature=${signingData.signature}` - }; - - // 發送請求 - const response = await axios({ - method, - url: apiUrl, - headers, - data: body || undefined - }); - - // 輸出結果 - console.log(`響應狀態碼: ${response.status}`); - console.log(`響應內容: ${JSON.stringify(response.data)}`); - - } catch (error) { - console.error('請求錯誤:', error.message); - if (error.response) { - console.error(`響應狀態碼: ${error.response.status}`); - console.error(`響應內容: ${JSON.stringify(error.response.data)}`); - } - } -} - -// 執行請求 -sendApiRequest(); -``` - -## 常見響應碼 - -| HTTP 狀態碼 | 描述 | -| -------- | ------- | -| 200 | 請求成功 | -| 401 | 身份驗證失敗 | -| 403 | 權限不足 | -| 404 | 資源不存在 | -| 422 | 請求參數錯誤 | -| 500 | 伺服器內部錯誤 | - -## 安全建議 - -1. **保護您的 API 令牌**:不要在客戶端代碼中硬編碼或公開您的 API 令牌 -2. **定期輪換令牌**:定期更改您的 API 令牌以提高安全性 -3. **配置 IP 白名單**:在生產環境中使用 IP 白名單限制訪問 - -## 常見問題解答 - -### 簽名驗證失敗 - -如果遇到簽名驗證失敗,請檢查: - - - 確保使用了正確的 API 令牌和 ID - - 檢查客戶端和伺服器時間是否準確;時間戳之間的差異超過 300 秒將導致驗證失敗 - - 確保請求主體在計算簽名前後沒有被修改 - - 確保 URL 路徑處理正確;請記住在規範化路徑時要移除入口前綴 - -### 請求超時 - - - 檢查網絡連接 - - 確認伺服器狀態 - - 考慮增加客戶端的超時設置 diff --git a/zh_TW/advanced/faq.md b/zh_TW/advanced/faq.md deleted file mode 100644 index 51a0f71..0000000 --- a/zh_TW/advanced/faq.md +++ /dev/null @@ -1,80 +0,0 @@ -# 常見問題 - -以下是關於 AcePanel 的一些常見問題和解答。 如果您有任何其他問題,請隨時在 [AcePanel 社區](https://tom.moe/c/technical/acepanel) 提問。 If you find any bugs, please submit a [GitHub Issue](https://github.com/acepanel/panel/issues). - -## 配置 QUIC(HTTP3) - -AcePanel 目前支持自動 QUIC 配置,但出於兼容性原因,默認不添加 `Alt-Svc` 標頭。 瀏覽器在未檢測到 `Alt-Svc` 標頭時不會嘗試使用 QUIC 連接。 - -如果您不使用 CDN,可以將下述配置添加到網站的重寫規則中,以告訴瀏覽器該網站支持並使用 QUIC 連接。 - -```nginx -add_header Alt-Svc 'h3=":$server_port"; ma=2592000'; -``` - -如果您使用 CDN 或有代理伺服器在前端,則 QUIC 需要在 CDN / 前端啟用。 - -如果配置後仍不生效,請檢查您的瀏覽器版本和 UDP 443 端口的可用性。 - -- 根據 Nginx 的 git 提交記錄,1.25 版本下所有 QUIC 草案版本已經移除,因此 `Alt-Svc` 無需添加草案版本號。 - -## 配置 TLSv1.1 TLSv1 - -當前面板 OpenResty 使用 OpenSSL 3.5 版本編譯,默認禁用已棄用的 TLSv1.1 TLSv1 協議。 - -當然,如果您的業務必須使用這兩個協議,您可以使用下述 SSL 配置啟用。 - -```nginx -ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; -ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:@SECLEVEL=0; -ssl_prefer_server_ciphers on; -``` - -## 配置反向代理 - -AcePanel v2.4.10+ 自帶反向代理配置生成器,您可以通過站點重寫配置頁面的右上角訪問。 - -注意:如果設置反向代理後出現 CSS/JS 等靜態資源無法正常加載的問題,請移除站點主配置文件中的 **不記錄靜態文件** 部分。 - -## 配置進程監控 - -1. 安裝 Supervisor 管理器並打開。 -2. 在 Supervisor 管理器中創建需要被監控的進程(不建議使用 root 作為運行用戶)。 -3. 常見問題:[https://tom.moe/t/supervisor/3112](https://tom.moe/t/supervisor/3112) - -## 配置 IPv6 - -如果您想要啟用 IPv6 支持,您需要將 `[::]:80` 和 `[::]:443` 添加到網站的監聽地址配置。 - -## 配置容器鏡像加速 - -由於一些原因,國內用戶可能無法連接到 Docker Hub 以拉取容器鏡像,因此需要配置鏡像加速。 - -### 對於 Podman - -在面板中打開 Podman 設置頁面,並導航到註冊表配置選項卡。 - -滾動到配置文件底部,添加如下配置並保存: - -``` -[[registry]] -location = "docker.io" -[[registry.mirror]] -location = "docker.1ms.run" -``` - -其中 docker.1ms.run 為配置的鏡像加速地址。 您可以參考其他教程進行設置和使用。 - -### 對於 Docker - -在面板中打開 Docker 設置頁面,並導航到配置選項卡。 - -添加如下配置並保存: - -```json -{ - "registry-mirrors": ["https://docker.1ms.run"] -} -``` - -其中 https://docker.1ms.run 為配置的鏡像加速地址。 您可以參考其他教程進行設置和使用。 diff --git a/zh_TW/advanced/safe.md b/zh_TW/advanced/safe.md deleted file mode 100644 index c9d458d..0000000 --- a/zh_TW/advanced/safe.md +++ /dev/null @@ -1,32 +0,0 @@ -# 安全性建議 - -透過以下安全措施,幾乎可以杜絕一切被黑/掛馬問題。 - -### 網站方面 - -根據以往經驗,大多數被黑和惡意程式事件都是由程序漏洞造成的,與面板或環境無關。 為了網站安全,你應該: - -1. 避免使用盜版程序或軟體,特別是在你無法判斷它們是否被篡改的情況下。 -2. 定期更新網站程序和軟體環境;不要因為麻煩而使用過時的軟體,因為其安全性無法保證。 -3. 網站後台禁止使用弱密碼。 密碼強烈建議使用隨機生成器生成大於20位的混合字符,並存儲在安全的位置。 如果可能,為你的程序啟用兩步驟驗證(2FA)。 -4. 設置所有網站數據的定期備份;不要在沒有備份的情況下運行。 -5. PHP預設禁用了某些高風險功能;除非絕對必要,否則不要移除這些限制。 - -### 系統方面 - -現代系統出現嚴重安全漏洞的概率是很低的,但你仍應該做到: - -1. 定期更新系統軟體。 (使用 `yum update` 或 `apt upgrade`)。 -2. SSH禁止使用弱密碼和默認的22端口。 密碼強烈建議使用隨機生成器生成大於20位的混合字符,並存儲在安全的位置。 如果可能,考慮安裝Fail2ban以進行針對性保護。 -3. 不要隨意給予777權限或執行權限給www用戶,因為這可能造成重大的安全隱患。 -4. 如果你的服務提供商提供VNC伺服器管理,考慮關閉SSH以從源頭解決問題。 - -### 面板方面 - -AcePanel 擁有與 root 相同的權限,不當管理可能會造成嚴重的安全問題。 你應該做到: - -1. 定期更新面板及透過它安裝的應用。 我們建議關注我們的頻道或群組,以便及時收到各種更新消息。 -2. 面板禁止使用弱密碼和默認8888端口。 密碼強烈建議使用隨機生成器生成大於20位的混合字符,並存儲在安全的位置。 -3. 建議修改面板入口並啟用HTTPS,以防止被掃描器檢測和中間人攻擊。 -4. 除非必要,否則不允許防火牆訪問內部服務端口(Redis 6379、MySQL 3306、PostgreSQL 5432等),因為這可能造成嚴重的安全風險。 (網站本地連接不需要放行;連接問題是程序問題)。 -5. 對於安全性要求較高的情況,考慮定期停止面板運行,僅在需要時啟動(停止運行面板不會影響網站、計劃任務等)。 diff --git a/zh_TW/cert.md b/zh_TW/cert.md deleted file mode 100644 index 4f17ce9..0000000 --- a/zh_TW/cert.md +++ /dev/null @@ -1,202 +0,0 @@ ---- -sidebar: false -prev: false -next: false ---- - -# 證書 - -如果 3 個月的免費證書無法滿足您的需求,您可以選擇購買更高級別的證書。 我們提供 DV 單域名證書和 DV 通配符證書供您選擇。 - -由於定價政策的限制,請通過右上角的群組鏈接直接聯繫我們的銷售團隊以獲取具體價格和購買信息。 - - - -## 選擇證書 - -
-
-
-

DV 單域名證書

-
-
國際知名品牌證書
-
¥ 1X/年
-
-
- 域名驗證(DV)證書 -
-
- 僅支持一個域名 -
-
- 一年有效期 -
-
- 快速頒發 -
-
-
-
-
-

DV 通配符證書

-
-
國際知名品牌證書
-
¥ 1XX/年
-
-
- 域名驗證(DV)證書 -
-
- 涵蓋所有子域 -
-
- 一年有效期 -
-
- 快速頒發 -
-
-
-
- -## 證書特點 - -
-
-
-
🛡️
-
-

安全可靠

-

使用國際標準來保護網站安全

-
-
-
-
-
-

快速簽發

-

簡化簽發流程,以快速提供證書

-
-
-
-
💳
-
-

靈活付費

-

提供多種規格以滿足不同需求

-
-
-
-
👨‍💻
-
-

專業服務

-

專業技術支持確保無憂使用

-
-
-
-
diff --git a/zh_TW/index.md b/zh_TW/index.md deleted file mode 100644 index 3750138..0000000 --- a/zh_TW/index.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -layout: home -hero: - name: "AcePanel" - text: "簡單輕量 • 高效能運維" - tagline: 企業伺服器運維管理面板 - actions: - - theme: brand - text: 🌟 點亮 Star - link: https://github.com/acepanel/panel - target: _blank - - theme: alt - text: 快速安裝 - link: /zh_TW/quickstart/install -features: - - icon: ✨ - title: 極低佔用 - details: 以 Go 語言開發,安裝包小,佔用低,單文件運行,不會影響系統性能 - - icon: 🛠 - title: 低破壞性 - details: 設計為盡可能減少對系統的額外修改,在同類產品中,我們對系統的修改最少 - - icon: 📅 - title: 跟隨時代 - details: 整體設計走在時代前沿,對新系統兼容性好,在同類產品中處於領先地位 - - icon: 🚀 - title: 高效運維 - details: 功能完善,自定義能力強,既可快速部署小型網站,也可基於定制化需求部署複雜應用 - - icon: ⛓️‍💥 - title: 離線運行 - details: 支持離線模式,甚至可以在部署完成後停止面板進程,不會對已有服務造成任何影響 - - icon: 🛡 - title: 安全穩定 - details: 面板採用業界多種技術保障本體安全性,已在多個生產環境中長期穩定運行 - - icon: 💽 - title: 全面開源 - details: 少有的全開源面板,您可以在遵守開源協議的前提下對面板自由修改、二次開發 - - icon: 🆓 - title: 永久免費 - details: 承諾面板本體未來不會引入任何收費/授權功能,永久免費使用 ---- - -## 合作夥伴 - - diff --git a/zh_TW/quickstart/container.md b/zh_TW/quickstart/container.md deleted file mode 100644 index 2bc5060..0000000 --- a/zh_TW/quickstart/container.md +++ /dev/null @@ -1,25 +0,0 @@ -# 管理容器 - -開始前需安裝 Docker / Podman 容器引擎。 - -容器引擎安裝完畢後,即可前往面板容器管理處創建容器(此處以 pgadmin4 為例)。 - -首先導航到鏡像選項卡拉取需要的鏡像。 視網路環境可能需要數分鐘到數十分鐘。 - -![拉取鏡像](/images/container/container1.png) - -鏡像拉取完成後,導航到容器選項卡開始創建容器。 - -![創建容器](/images/container/container2.png) - -表單內容按容器的說明填寫。 此處使用的 pgadmin4 鏡像需要映射 80 端口及配置 2 個默認環境變數,無需映射目錄。 - -容器創建完成後可點擊右上角刷新按鈕和容器右側的日誌按鈕檢查是否正常啟動。 - -![容器啟動](/images/container/container3.png) - -若容器未能啟動,請根據日誌進行修正。 - -如果映射了外部端口,需要到防火牆菜單放行相應的端口。 - -![創建成功](/images/container/container4.png) diff --git a/zh_TW/quickstart/disk.md b/zh_TW/quickstart/disk.md deleted file mode 100644 index 01af9e3..0000000 --- a/zh_TW/quickstart/disk.md +++ /dev/null @@ -1,9 +0,0 @@ -# 掛載分區 - -如果您的伺服器有未掛載的數據磁碟,您可以在安裝之前以 `root` 用戶登錄並運行以下命令以自動掛載它們。 面板安裝後不支持跨目錄遷移。 - -```shell -curl -fsLm 10 -o auto_mount.sh https://dl.cdn.haozi.net/panel/auto_mount.sh && bash auto_mount.sh -``` - -您也可以通過工單聯繫伺服器提供商以請求掛載分區的幫助,或者在安裝面板之前自行掛載分區。 diff --git a/zh_TW/quickstart/install.md b/zh_TW/quickstart/install.md deleted file mode 100644 index f752513..0000000 --- a/zh_TW/quickstart/install.md +++ /dev/null @@ -1,44 +0,0 @@ -# 安裝面板 - -AcePanel supports the latest two stable releases of mainstream `amd64` and `arm64` architecture systems. Installation of -the LNMP environment has been tested on all systems listed in the table below. - -It is recommended to use systems marked as **Recommended**. Unless there are special circumstances, it is not -recommended to use systems marked as **Not Recommended**. - -For systems not listed in the table below, you can try installing on your own, but no free technical support will be -provided. - -| 系統 | 版本 | 備註 | -| ---------------- | -- | --- | -| AlmaLinux | 10 | 推薦 | -| AlmaLinux | 9 | 支持 | -| RockyLinux | 10 | 推薦 | -| RockyLinux | 9 | 支持 | -| CentOS Stream | 10 | 不推薦 | -| CentOS Stream | 9 | 不推薦 | -| Ubuntu | 24 | 推薦 | -| Ubuntu | 22 | 支持 | -| Debian | 13 | 推薦 | -| Debian | 12 | 支持 | -| OpenCloudOS | 9 | 支持 | -| TencentOS Server | 4 | 支持 | - -As system versions continue to update, we may also terminate support for some overly outdated systems to ensure the -robustness of the Panel. - -## 開始安裝 - -> 如需掛載分區,請在安裝面板前完成。 Directory migration is not -> supported after Panel installation. - -**AcePanel recommends -using [LFCloud high-performance AMD EYPC server](https://www.dkdun.cn/aff/MQZZNVHQ) for installation.** - -以 `root` 用戶登錄服務器,運行以下命令安裝面板: - -```shell -bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh) -``` - -一般 2 分鐘內即可完成安裝。 安裝過程中請勿關閉終端。 diff --git a/zh_TW/quickstart/panel.md b/zh_TW/quickstart/panel.md deleted file mode 100644 index 99b0d1e..0000000 --- a/zh_TW/quickstart/panel.md +++ /dev/null @@ -1,35 +0,0 @@ -# 管理面板 - -請勿在面板仍有任務運行時操作停止 / 重啟面板,否則可能會造成問題。 - -- Start Panel: `acepanel start` -- Stop Panel: `acepanel stop` -- Restart Panel: `acepanel restart` - -## 面板命令行 - -```bash -acepanel -``` - -可根據提示補全需要的命令進行操作。 - -例如,要更改使用者的密碼,您可以使用: - -```bash -acepanel user password haozi 123456 -``` - -這將把使用者 `haozi` 的密碼更改為 `123456`。 - -## 卸載面板 - -優先建議備份資料重裝系統,這樣可以保證系統純淨。 - -如果您無法重裝系統,請以`root`使用者登錄伺服器,執行以下命令卸載面板: - -```shell -bash <(curl -sSLm 10 https://dl.acepanel.net/helper.sh) -``` - -卸載面板前請務必備份好所有資料,提前卸載面板全部應用。 卸載後資料將**無法恢復**! diff --git a/zh_TW/support.md b/zh_TW/support.md deleted file mode 100644 index 18e45ee..0000000 --- a/zh_TW/support.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar: false -prev: false -next: false ---- - -# 支援 - -## 免費論壇服務 - -我們提供免費的論壇服務,您可以在論壇中提問、討論以及分享有關使用面板的問題。 - -- [Moe Tom](https://tom.moe/c/technical/acepanel) - -## 付費遠程服務 - -網站錯誤、速度慢、被感染惡意軟體? 伺服器資源使用過高、配置優化、入侵追蹤? 我們提供所有這些服務於一個地方。 - -### 遠程服務價格表 - -遠程服務是指我們透過遠程支援方式協助您解決問題。 - -| 服務名稱 | 描述 | 價格 | -| ---- | ---------------- | ------- | -| 單次服務 | 限於一次服務,問題解決後服務結束 | 從 ¥50 起 | - -### 服務流程 - -1. 提前聯繫我們並解釋問題 -2. 我們將評估問題,確認是否能夠解決並提供預估價格 -3. 在您確認價格後,支付 50% 預付款,服務開始 -4. 在服務完成後,您確認一切正常並支付剩餘款項 - -## 聯繫我們 - -- [企業微信](https://work.weixin.qq.com/kfid/kfc20ea8e38b5a4e73a) -- [QQ 826896000](https://wpa.qq.com/msgrd?v=3&uin=826896000&site=qq&menu=yes) diff --git a/zh_TW/version-[version].md b/zh_TW/version-[version].md deleted file mode 100644 index c538f63..0000000 --- a/zh_TW/version-[version].md +++ /dev/null @@ -1,8 +0,0 @@ -# v{{ $params.version }} - -- 版本類型:{{ $params.type == 'stable' ? '穩定版' : '測試版' }} -- 發布時間:{{ $params.time }} - -## 更新日誌 - - diff --git a/zh_TW/version-[version].paths.ts b/zh_TW/version-[version].paths.ts deleted file mode 100644 index 0085167..0000000 --- a/zh_TW/version-[version].paths.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - async paths() { - const resp = await (await fetch('https://api.acepanel.net/versions?locale=zh_TW')).json() - if (!resp.message || resp.message !== 'success') return [] - - return resp.data.slice(0, 10).map((item: any) => { - return { - params: { - version: item.version, - type: item.type, - time: item.updated_at.replace('T', ' ').slice(0, 19) - }, - content: item.description - } - }) - } -} \ No newline at end of file