docs(wip): documentation for v2
parent
712a4d2185
commit
2d52ada657
@ -1,53 +1,54 @@
|
||||
import {LocaleSpecificConfig, DefaultTheme} from "vitepress"
|
||||
import {LocaleSpecificConfig, DefaultTheme} from 'vitepress'
|
||||
import {demoUrl} from './common'
|
||||
|
||||
export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{text: 'Home', link: '/'},
|
||||
{text: 'Guide', link: '/guide/about'},
|
||||
{text: 'Demo', link: demoUrl}
|
||||
],
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{text: 'Home', link: '/'},
|
||||
{text: 'Guide', link: '/guide/about'},
|
||||
{text: 'Demo', link: demoUrl}
|
||||
],
|
||||
|
||||
sidebar: {
|
||||
'/guide/': [
|
||||
{
|
||||
text: 'Introduction',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'What is Nginx UI?', link: '/guide/about'},
|
||||
{text: 'Getting Started', link: '/guide/getting-started'},
|
||||
{text: 'Install Script', link: '/guide/install-script-linux'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Development',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Build', link: '/guide/build'},
|
||||
{text: 'Project Structure', link: '/guide/project-structure'},
|
||||
{text: 'Config Template', link: '/guide/nginx-ui-template'},
|
||||
{text: 'Contributing', link: '/guide/contributing'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Configuration',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Server', link: '/guide/config-server'},
|
||||
{text: 'Nginx Log', link: '/guide/config-nginx-log'},
|
||||
{text: 'Open AI', link: '/guide/config-openai'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Appendix',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Nginx Proxy Example', link: '/guide/nginx-proxy-example'},
|
||||
{text: 'License', link: '/guide/license'}
|
||||
]
|
||||
}
|
||||
],
|
||||
sidebar: {
|
||||
'/guide/': [
|
||||
{
|
||||
text: 'Introduction',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'What is Nginx UI?', link: '/guide/about'},
|
||||
{text: 'Getting Started', link: '/guide/getting-started'},
|
||||
{text: 'Install Script', link: '/guide/install-script-linux'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Development',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Build', link: '/guide/build'},
|
||||
{text: 'Project Structure', link: '/guide/project-structure'},
|
||||
{text: 'Config Template', link: '/guide/nginx-ui-template'},
|
||||
{text: 'Contributing', link: '/guide/contributing'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Configuration',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Server', link: '/guide/config-server'},
|
||||
{text: 'Nginx Log', link: '/guide/config-nginx'},
|
||||
{text: 'Open AI', link: '/guide/config-openai'},
|
||||
{text: 'Casdoor', link: '/guide/config-casdoor'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Appendix',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Nginx Proxy Example', link: '/guide/nginx-proxy-example'},
|
||||
{text: 'License', link: '/guide/license'}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,93 +1,97 @@
|
||||
import {LocaleSpecificConfig, DefaultTheme} from "vitepress"
|
||||
import {LocaleSpecificConfig, DefaultTheme} from 'vitepress'
|
||||
import {demoUrl, editLinkPattern} from './common'
|
||||
|
||||
export const zhCNConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{text: '首页', link: '/zh_CN/'},
|
||||
{text: '手册', link: '/zh_CN/guide/about'},
|
||||
{text: '演示', link: demoUrl}
|
||||
],
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{text: '首页', link: '/zh_CN/'},
|
||||
{text: '手册', link: '/zh_CN/guide/about'},
|
||||
{text: '演示', link: demoUrl}
|
||||
],
|
||||
|
||||
editLink: {
|
||||
text: '编辑此页',
|
||||
pattern: editLinkPattern
|
||||
},
|
||||
editLink: {
|
||||
text: '编辑此页',
|
||||
pattern: editLinkPattern
|
||||
},
|
||||
|
||||
sidebar: {
|
||||
'/zh_CN/guide/': [
|
||||
{
|
||||
text: '介绍',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '何为 Nginx UI?', link: '/zh_CN/guide/about'},
|
||||
{text: '即刻开始', link: '/zh_CN/guide/getting-started'},
|
||||
{text: '安装脚本', link: '/zh_CN/guide/install-script-linux'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '开发',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '构建', link: '/zh_CN/guide/build'},
|
||||
{text: '项目结构', link: '/zh_CN/guide/project-structure'},
|
||||
{text: '配置模板', link: '/zh_CN/guide/nginx-ui-template'},
|
||||
{text: '贡献代码', link: '/zh_CN/guide/contributing'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '配置',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '服务端', link: '/zh_CN/guide/config-server'},
|
||||
{text: 'Nginx 日志', link: '/zh_CN/guide/config-nginx-log'},
|
||||
{text: 'Open AI', link: '/zh_CN/guide/config-openai'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '附录',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Nginx 代理示例', link: '/zh_CN/guide/nginx-proxy-example'},
|
||||
{text: '开源协议', link: '/zh_CN/guide/license'}
|
||||
]
|
||||
}
|
||||
]
|
||||
sidebar: {
|
||||
'/zh_CN/guide/': [
|
||||
{
|
||||
text: '介绍',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '何为 Nginx UI?', link: '/zh_CN/guide/about'},
|
||||
{text: '即刻开始', link: '/zh_CN/guide/getting-started'},
|
||||
{text: '安装脚本', link: '/zh_CN/guide/install-script-linux'}
|
||||
]
|
||||
},
|
||||
|
||||
docFooter: {
|
||||
prev: '上一页',
|
||||
next: '下一页',
|
||||
{
|
||||
text: '开发',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '构建', link: '/zh_CN/guide/build'},
|
||||
{text: '项目结构', link: '/zh_CN/guide/project-structure'},
|
||||
{text: '配置模板', link: '/zh_CN/guide/nginx-ui-template'},
|
||||
{text: '贡献代码', link: '/zh_CN/guide/contributing'}
|
||||
]
|
||||
},
|
||||
returnToTopLabel: '返回顶部',
|
||||
outlineTitle: '导航栏',
|
||||
darkModeSwitchLabel: '外观',
|
||||
sidebarMenuLabel: '归档',
|
||||
lastUpdatedText: '更新于',
|
||||
{
|
||||
text: '配置',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '服务端', link: '/zh_CN/guide/config-server'},
|
||||
{text: 'Nginx', link: '/zh_CN/guide/config-nginx'},
|
||||
{text: 'Open AI', link: '/zh_CN/guide/config-openai'},
|
||||
{text: 'Casdoor', link: '/zh_CN/guide/config-casdoor'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '附录',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Nginx 代理示例', link: '/zh_CN/guide/nginx-proxy-example'},
|
||||
{text: '开源协议', link: '/zh_CN/guide/license'}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
search: {
|
||||
provider: 'local',
|
||||
options: {
|
||||
locales: {
|
||||
zh_CN: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: '搜索文档',
|
||||
buttonAriaLabel: '搜索文档'
|
||||
},
|
||||
modal: {
|
||||
noResultsText: '无法找到相关结果',
|
||||
resetButtonTitle: '清除查询条件',
|
||||
footer: {
|
||||
selectText: '选择',
|
||||
navigateText: '切换',
|
||||
closeText: '关闭'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
docFooter: {
|
||||
prev: '上一页',
|
||||
next: '下一页'
|
||||
},
|
||||
returnToTopLabel: '返回顶部',
|
||||
outline: {
|
||||
label: '导航栏'
|
||||
},
|
||||
darkModeSwitchLabel: '外观',
|
||||
sidebarMenuLabel: '归档',
|
||||
lastUpdated: {
|
||||
text: '更新于'
|
||||
},
|
||||
search: {
|
||||
provider: 'local',
|
||||
options: {
|
||||
locales: {
|
||||
zh_CN: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: '搜索文档',
|
||||
buttonAriaLabel: '搜索文档'
|
||||
},
|
||||
modal: {
|
||||
noResultsText: '无法找到相关结果',
|
||||
resetButtonTitle: '清除查询条件',
|
||||
footer: {
|
||||
selectText: '选择',
|
||||
navigateText: '切换',
|
||||
closeText: '关闭'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,92 +1,97 @@
|
||||
import {LocaleSpecificConfig, DefaultTheme} from "vitepress"
|
||||
import {LocaleSpecificConfig, DefaultTheme} from 'vitepress'
|
||||
import {demoUrl, editLinkPattern} from './common'
|
||||
|
||||
export const zhTWConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{text: '首頁', link: '/zh_TW/'},
|
||||
{text: '手冊', link: '/zh_TW/guide/about'},
|
||||
{text: '演示', link: demoUrl}
|
||||
],
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{text: '首頁', link: '/zh_TW/'},
|
||||
{text: '手冊', link: '/zh_TW/guide/about'},
|
||||
{text: '演示', link: demoUrl}
|
||||
],
|
||||
|
||||
editLink: {
|
||||
text: '編輯此頁',
|
||||
pattern: editLinkPattern
|
||||
},
|
||||
editLink: {
|
||||
text: '編輯此頁',
|
||||
pattern: editLinkPattern
|
||||
},
|
||||
|
||||
sidebar: {
|
||||
'/zh_TW/guide/': [
|
||||
{
|
||||
text: '介紹',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '何為 Nginx UI?', link: '/zh_TW/guide/about'},
|
||||
{text: '即刻開始', link: '/zh_TW/guide/getting-started'},
|
||||
{text: '安裝指令碼', link: '/zh_TW/guide/install-script-linux'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '開發',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '構建', link: '/zh_TW/guide/build'},
|
||||
{text: '專案結構', link: '/zh_TW/guide/project-structure'},
|
||||
{text: '貢獻程式碼', link: '/zh_TW/guide/contributing'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '配置',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '服務端', link: '/zh_TW/guide/config-server'},
|
||||
{text: 'Nginx 日誌', link: '/zh_TW/guide/config-nginx-log'},
|
||||
{text: 'Open AI', link: '/zh_TW/guide/config-openai'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '附錄',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Nginx 代理示例', link: '/zh_TW/guide/nginx-proxy-example'},
|
||||
{text: '開源協議', link: '/zh_TW/guide/license'}
|
||||
]
|
||||
}
|
||||
]
|
||||
sidebar: {
|
||||
'/zh_TW/guide/': [
|
||||
{
|
||||
text: '介紹',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '何為 Nginx UI?', link: '/zh_TW/guide/about'},
|
||||
{text: '即刻開始', link: '/zh_TW/guide/getting-started'},
|
||||
{text: '安裝指令碼', link: '/zh_TW/guide/install-script-linux'}
|
||||
]
|
||||
},
|
||||
|
||||
docFooter: {
|
||||
prev: '上一頁',
|
||||
next: '下一頁',
|
||||
{
|
||||
text: '開發',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '構建', link: '/zh_TW/guide/build'},
|
||||
{text: '專案結構', link: '/zh_TW/guide/project-structure'},
|
||||
{text: '貢獻程式碼', link: '/zh_TW/guide/contributing'}
|
||||
]
|
||||
},
|
||||
returnToTopLabel: '返回頂部',
|
||||
outlineTitle: '導航欄',
|
||||
darkModeSwitchLabel: '外觀',
|
||||
sidebarMenuLabel: '歸檔',
|
||||
lastUpdatedText: '更新於',
|
||||
{
|
||||
text: '配置',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: '服務端', link: '/zh_TW/guide/config-server'},
|
||||
{text: 'Nginx 日誌', link: '/zh_TW/guide/config-nginx'},
|
||||
{text: 'Open AI', link: '/zh_TW/guide/config-openai'},
|
||||
{text: 'Casdoor', link: '/zh_TW/guide/config-casdoor'}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '附錄',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{text: 'Nginx 代理示例', link: '/zh_TW/guide/nginx-proxy-example'},
|
||||
{text: '開源協議', link: '/zh_TW/guide/license'}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
docFooter: {
|
||||
prev: '上一頁',
|
||||
next: '下一頁'
|
||||
},
|
||||
returnToTopLabel: '返回頂部',
|
||||
outline: {
|
||||
label: '導航欄'
|
||||
},
|
||||
darkModeSwitchLabel: '外觀',
|
||||
sidebarMenuLabel: '歸檔',
|
||||
lastUpdated: {
|
||||
text: '更新於'
|
||||
},
|
||||
|
||||
search: {
|
||||
provider: 'local',
|
||||
options: {
|
||||
locales: {
|
||||
zh_CN: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: '搜尋文件',
|
||||
buttonAriaLabel: '搜尋文件'
|
||||
},
|
||||
modal: {
|
||||
noResultsText: '無法找到相關結果',
|
||||
resetButtonTitle: '清除查詢條件',
|
||||
footer: {
|
||||
selectText: '選擇',
|
||||
navigateText: '切換',
|
||||
closeText: '關閉'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
search: {
|
||||
provider: 'local',
|
||||
options: {
|
||||
locales: {
|
||||
zh_CN: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: '搜尋文件',
|
||||
buttonAriaLabel: '搜尋文件'
|
||||
},
|
||||
modal: {
|
||||
noResultsText: '無法找到相關結果',
|
||||
resetButtonTitle: '清除查詢條件',
|
||||
footer: {
|
||||
selectText: '選擇',
|
||||
navigateText: '切換',
|
||||
closeText: '關閉'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 305 KiB After Width: | Height: | Size: 421 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 294 KiB After Width: | Height: | Size: 413 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 422 KiB |
@ -1,46 +0,0 @@
|
||||
# Nginx 日志
|
||||
|
||||
Nginx 日志对于监控、排查问题和维护您的 Web 服务器至关重要。它们提供了有关服务器性能、用户行为和潜在问题的宝贵见解。在本节中,我们将讨论两种主要类型的日志:访问日志和错误日志。
|
||||
|
||||
对于从 v1.5.2 或更早版本升级的 Nginx-UI Docker 用户,在配置 `app.ini` 之前,至关重要的是在您的 `nginx.conf`
|
||||
中添加单独的 `access_log` 和 `error_log` 指令。
|
||||
|
||||
在 Nginx-UI 容器中,`/var/log/nginx/access.log` 是一个指向 `/dev/stdout` 的符号链接,而 `/var/log/nginx/error.log`
|
||||
是一个指向 `/dev/stderr` 的符号链接。这种设置允许您使用 `docker logs nginx-ui` 命令查看 Nginx 和 Nginx-UI 日志。然而,这两个设备不支持
|
||||
`tail` 命令,因此有必要使用额外的日志文件来记录 Nginx 日志。
|
||||
|
||||
示例:
|
||||
|
||||
```nginx
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
error_log /var/log/nginx/error.local.log notice;
|
||||
|
||||
http {
|
||||
...
|
||||
access_log /var/log/nginx/access.log main;
|
||||
access_log /var/log/nginx/access.local.log main;
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
此外,在 `app.ini` 中设置 nginx 访问日志和错误日志路径,然后重新启动 nginx-ui。
|
||||
|
||||
示例:
|
||||
|
||||
```ini
|
||||
[nginx_log]
|
||||
AccessLogPath = /var/log/nginx/access.local.log
|
||||
ErrorLogPath = /var/log/nginx/error.local.log
|
||||
```
|
||||
|
||||
## AccessLogPath
|
||||
|
||||
- 类型:`string`
|
||||
|
||||
此选项用于为 Nginx UI 设置 Nginx 访问日志的路径,以便我们在线查看日志内容。
|
||||
|
||||
## ErrorLogPath
|
||||
|
||||
- 类型:`string`
|
||||
|
||||
此选项用于为 Nginx UI 设置 Nginx 错误日志的路径,以便我们在线查看日志内容。
|
||||
@ -0,0 +1,130 @@
|
||||
# Nginx
|
||||
|
||||
在本节中,我们将会介绍 Nginx UI 中关于 Nginx 控制命令、日志路径等参数的配置选项。
|
||||
|
||||
::: tip 提示
|
||||
自 v2.0.0-beta.3 版本起,我们将 `nginx_log` 配置项改名为 `nginx`。
|
||||
:::
|
||||
|
||||
|
||||
## 日志
|
||||
Nginx 日志对于监控、排查问题和维护您的 Web 服务器至关重要。它们提供了有关服务器性能、用户行为和潜在问题的宝贵见解。
|
||||
|
||||
在本节中,我们将讨论两种主要类型的日志:访问日志和错误日志。
|
||||
|
||||
对于从 v1.5.2 或更早版本升级的 Nginx-UI Docker 用户,在配置 `app.ini` 之前,您需要在 `nginx.conf`
|
||||
中添加单独的 `access_log` 和 `error_log` 指令。
|
||||
|
||||
在 Nginx-UI 容器中,`/var/log/nginx/access.log` 是一个指向 `/dev/stdout` 的符号链接,而 `/var/log/nginx/error.log`
|
||||
是一个指向 `/dev/stderr` 的符号链接。这种设置允许您使用 `docker logs nginx-ui` 命令查看 Nginx 和 Nginx-UI 日志。然而,这两个设备不支持
|
||||
`tail` 命令,因此有必要使用额外的日志文件来记录 Nginx 日志。
|
||||
|
||||
示例:
|
||||
|
||||
```nginx
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
error_log /var/log/nginx/error.local.log notice;
|
||||
|
||||
http {
|
||||
...
|
||||
access_log /var/log/nginx/access.log main;
|
||||
access_log /var/log/nginx/access.local.log main;
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
之后,请在 `app.ini` 中设置 nginx 访问日志和错误日志路径,然后重新启动 nginx-ui。
|
||||
|
||||
示例:
|
||||
|
||||
```ini
|
||||
[nginx_log]
|
||||
AccessLogPath = /var/log/nginx/access.local.log
|
||||
ErrorLogPath = /var/log/nginx/error.local.log
|
||||
```
|
||||
|
||||
### AccessLogPath
|
||||
|
||||
- 类型:`string`
|
||||
|
||||
此选项用于为 Nginx UI 设置 Nginx 访问日志的路径,以便我们在线查看日志内容。
|
||||
|
||||
::: tip 提示
|
||||
在 v2 版本中,我们会读取 `nginx -V` 命令的输出,以获取 Nginx 访问日志的默认路径。
|
||||
|
||||
如果您需要设置不同的路径,您可以使用此选项。
|
||||
:::
|
||||
|
||||
### ErrorLogPath
|
||||
|
||||
- 类型:`string`
|
||||
|
||||
此选项用于为 Nginx UI 设置 Nginx 错误日志的路径,以便我们在线查看日志内容。
|
||||
|
||||
::: tip 提示
|
||||
在 v2 版本中,我们会读取 `nginx -V` 命令的输出,以获取 Nginx 错误日志的默认路径。
|
||||
|
||||
如果您需要设置不同的路径,您可以使用此选项。
|
||||
:::
|
||||
|
||||
## 服务监控与控制
|
||||
|
||||
在本节中,我们将会介绍 Nginx UI 中关于 Nginx 服务的监控和控制命令的配置选项。
|
||||
|
||||
### ConfigDir
|
||||
- 类型:`string`
|
||||
|
||||
此选项用于设置 Nginx 配置文件夹的路径。
|
||||
|
||||
在 v2 版本中,我们会读取 `nginx -V` 命令的输出,以获取 Nginx 配置文件的默认路径。
|
||||
|
||||
如果您需要覆盖默认路径,您可以使用此选项。
|
||||
|
||||
### PIDPath
|
||||
- 类型:`string`
|
||||
|
||||
此选项用于设置 Nginx PID 文件的路径。Nginx UI 将通过判断该文件是否存在来判断 Nginx 服务的运行状态。
|
||||
|
||||
在 v2 版本中,我们会读取 `nginx -V` 命令的输出,以获取 Nginx PID 文件的默认路径。
|
||||
|
||||
如果您需要覆盖默认路径,您可以使用此选项。
|
||||
|
||||
### TestConfigCmd
|
||||
- 类型:`string`
|
||||
- 默认值:`nginx -t`
|
||||
|
||||
此选项用于设置 Nginx 测试配置的命令。
|
||||
|
||||
### ReloadCmd
|
||||
- 类型:`string`
|
||||
- 默认值:`nginx -s reload`
|
||||
|
||||
此选项用于设置 Nginx 重新加载配置的命令。
|
||||
|
||||
### RestartCmd
|
||||
- 类型:`string`
|
||||
|
||||
::: tip 提示
|
||||
我们建议使用 systemd 管理 Nginx 的用户,将这个值设置为 `systemctl restart nginx`。
|
||||
否则,当您在 Nginx UI 中重启 Nginx 后,将无法在 systemctl 中获取 Nginx 的准确状态。
|
||||
:::
|
||||
|
||||
若此选项为空,则 Nginx UI 将使用以下命令关闭 Nginx 服务:
|
||||
|
||||
```bash
|
||||
start-stop-daemon --stop --quiet --oknodo --retry=TERM/30/KILL/5 --pidfile $PID
|
||||
```
|
||||
|
||||
若无法从 `nginx -V` 中获得 `--sbin-path` 路径,则 Nginx UI 将使用以下命令启动 Nginx 服务:
|
||||
|
||||
```bash
|
||||
nginx
|
||||
```
|
||||
|
||||
若可以获取到 `--sbin-path` 路径,则 Nginx UI 将使用以下命令启动 Nginx 服务:
|
||||
|
||||
```bash
|
||||
start-stop-daemon --start --quiet --pidfile $PID --exec $SBIN_PATH
|
||||
```
|
||||
|
||||
|
||||
Loading…
Reference in New Issue