docs: add maintenance template configuration

This commit is contained in:
0xJacky
2026-05-13 08:51:06 +08:00
parent 4d0dcb92b6
commit ae2c830cd6
6 changed files with 78 additions and 0 deletions
+25
View File
@@ -128,6 +128,31 @@ This option is used to set the port for the Nginx stub status module. The stub s
Make sure the port you set is not being used by other services.
:::
## Maintenance Page
### MaintenanceTemplate
- Type: `string`
- Environment Variable: `NGINX_UI_NGINX_MAINTENANCE_TEMPLATE`
- Example: `maintenance.html`
This option is used to select a custom HTML template for the Nginx UI maintenance page. You can set it through the environment variable or in Settings > Nginx.
Only the file name is used. Nginx UI loads the custom template from `/etc/nginx/maintenance/<filename>`, and path components in the configured value are ignored.
If this option is empty, the file cannot be read, or the file is empty, Nginx UI falls back to the built-in maintenance page template.
For Docker deployments, mount a host directory to `/etc/nginx/maintenance` and put your template file there:
```yaml
services:
nginx-ui:
image: uozi/nginx-ui:latest
volumes:
- ./maintenance:/etc/nginx/maintenance
environment:
- NGINX_UI_NGINX_MAINTENANCE_TEMPLATE=maintenance.html
```
## Container Control
In this section, we will introduce configuration options in Nginx UI for controlling Nginx services running in another Docker container.
+1
View File
@@ -98,6 +98,7 @@ Applicable for version v2.0.0-beta.37 and above.
| LogDirWhiteList | NGINX_UI_NGINX_LOG_DIR_WHITE_LIST |
| StubStatusPort | NGINX_UI_NGINX_STUB_STATUS_PORT |
| ContainerName | NGINX_UI_NGINX_CONTAINER_NAME |
| MaintenanceTemplate | NGINX_UI_NGINX_MAINTENANCE_TEMPLATE |
## Nginx Log
| Configuration Setting | Environment Variable |
+25
View File
@@ -129,6 +129,31 @@ start-stop-daemon --start --quiet --pidfile $PID --exec $SBIN_PATH
请确保您设置的端口未被其他服务占用。
:::
## 维护页面
### MaintenanceTemplate
- 类型:`string`
- 环境变量:`NGINX_UI_NGINX_MAINTENANCE_TEMPLATE`
- 示例:`maintenance.html`
此选项用于为 Nginx UI 维护页面选择自定义 HTML 模板。您可以通过环境变量设置,也可以在 Settings > Nginx 中设置。
此配置只使用文件名。Nginx UI 会从 `/etc/nginx/maintenance/<filename>` 加载自定义模板,配置值中的路径部分会被忽略。
如果此选项为空、文件不可读或文件内容为空,Nginx UI 将回退到内置维护页面模板。
对于 Docker 部署,请将宿主机目录挂载到 `/etc/nginx/maintenance`,并将模板文件放在该目录中:
```yaml
services:
nginx-ui:
image: uozi/nginx-ui:latest
volumes:
- ./maintenance:/etc/nginx/maintenance
environment:
- NGINX_UI_NGINX_MAINTENANCE_TEMPLATE=maintenance.html
```
## 容器控制
在本节中,我们将会介绍 Nginx UI 中关于控制运行在另一个 Docker 容器中的 Nginx 服务的配置选项。
+1
View File
@@ -109,6 +109,7 @@
| LogDirWhiteList | NGINX_UI_NGINX_LOG_DIR_WHITE_LIST |
| StubStatusPort | NGINX_UI_NGINX_STUB_STATUS_PORT |
| ContainerName | NGINX_UI_NGINX_CONTAINER_NAME |
| MaintenanceTemplate | NGINX_UI_NGINX_MAINTENANCE_TEMPLATE |
## Nginx Log
+25
View File
@@ -122,6 +122,31 @@ start-stop-daemon --start --quiet --pidfile $PID --exec $SBIN_PATH
請確保您設定的連接埠未被其他服務佔用。
:::
## 維護頁面
### MaintenanceTemplate
- 類型:`string`
- 環境變數:`NGINX_UI_NGINX_MAINTENANCE_TEMPLATE`
- 範例:`maintenance.html`
此選項用於為 Nginx UI 維護頁面選擇自訂 HTML 模板。您可以透過環境變數設定,也可以在 Settings > Nginx 中設定。
此設定只使用檔案名稱。Nginx UI 會從 `/etc/nginx/maintenance/<filename>` 載入自訂模板,設定值中的路徑部分會被忽略。
如果此選項為空、檔案不可讀或檔案內容為空,Nginx UI 將回退到內建維護頁面模板。
對於 Docker 部署,請將主機目錄掛載到 `/etc/nginx/maintenance`,並將模板檔案放在該目錄中:
```yaml
services:
nginx-ui:
image: uozi/nginx-ui:latest
volumes:
- ./maintenance:/etc/nginx/maintenance
environment:
- NGINX_UI_NGINX_MAINTENANCE_TEMPLATE=maintenance.html
```
## 容器控制
在本節中,我們將會介紹 Nginx UI 中關於控制運行在另一個 Docker 容器中的 Nginx 服務的設定選項。
+1
View File
@@ -109,6 +109,7 @@
| LogDirWhiteList | NGINX_UI_NGINX_LOG_DIR_WHITE_LIST |
| StubStatusPort | NGINX_UI_NGINX_STUB_STATUS_PORT |
| ContainerName | NGINX_UI_NGINX_CONTAINER_NAME |
| MaintenanceTemplate | NGINX_UI_NGINX_MAINTENANCE_TEMPLATE |
## Nginx Log