From fda04b9576bcfac6adbb91eef85f6ca41cae30a0 Mon Sep 17 00:00:00 2001 From: 0xJacky Date: Mon, 1 May 2023 01:08:05 +0800 Subject: [PATCH] docs(wip): added docs of config --- frontend/docs/.vitepress/config.ts | 13 +++- frontend/docs/guide/about.md | 2 +- frontend/docs/guide/config-nginx-log.md | 18 ++++++ frontend/docs/guide/config-openai.md | 32 ++++++++++ frontend/docs/guide/config-server.md | 79 ++++++++++++++++++++++++ frontend/docs/public/favicon.ico | Bin 0 -> 67646 bytes frontend/docs/reference/api-examples.md | 49 --------------- 7 files changed, 142 insertions(+), 51 deletions(-) create mode 100644 frontend/docs/guide/config-nginx-log.md create mode 100644 frontend/docs/guide/config-openai.md create mode 100644 frontend/docs/guide/config-server.md create mode 100644 frontend/docs/public/favicon.ico delete mode 100644 frontend/docs/reference/api-examples.md diff --git a/frontend/docs/.vitepress/config.ts b/frontend/docs/.vitepress/config.ts index aa326fe0..63b1fefd 100644 --- a/frontend/docs/.vitepress/config.ts +++ b/frontend/docs/.vitepress/config.ts @@ -15,7 +15,6 @@ export default defineConfig({ nav: [ {text: 'Home', link: '/'}, {text: 'Guide', link: '/guide/about'}, - {text: 'Reference', link: '/reference/api-examples'}, {text: 'Demo', link: 'https://nginxui.jackyu.cn'} ], @@ -30,10 +29,22 @@ export default defineConfig({ {text: 'Contributing', link: '/guide/contributing'}, {text: 'License', link: '/guide/license'} ] + }, + { + text: 'Configuration', + items: [ + {text: 'Server', link: '/guide/config-server'}, + {text: 'Nginx Log', link: '/guide/config-nginx-log'}, + {text: 'Open AI', link: '/guide/config-openai'} + ] } ] }, + search: { + provider: 'local' + }, + footer: { message: 'Released under the AGPL-3.0 License.', copyright: 'Copyright © 2021-' + thisYear() + ' Nginx UI Team' diff --git a/frontend/docs/guide/about.md b/frontend/docs/guide/about.md index 9913e2b0..922f5c25 100644 --- a/frontend/docs/guide/about.md +++ b/frontend/docs/guide/about.md @@ -1,6 +1,6 @@ # What is Nginx UI? -![Dashboard](../public/dashboard_en.png) +![Dashboard](/dashboard_en.png) Nginx UI is a comprehensive web-based interface designed to simplify the management and configuration of Nginx servers. It offers real-time server statistics, AI-powered ChatGPT assistance, one-click deployment, automatic renewal of Let's diff --git a/frontend/docs/guide/config-nginx-log.md b/frontend/docs/guide/config-nginx-log.md new file mode 100644 index 00000000..8904e513 --- /dev/null +++ b/frontend/docs/guide/config-nginx-log.md @@ -0,0 +1,18 @@ +# Nginx Log + +Nginx logs are essential for monitoring, troubleshooting, and maintaining your web server. They provide valuable +insights into server performance, user behavior, and potential issues. In this section, we will discuss the two primary +types of logs: access logs and error logs. + +## AccessLogPath + +- Type: `string` + +This option is used to set the path of nginx access log for Nginx UI, so we can view the log content online. + +## ErrorLogPath + +- Type: `string` + +This option is used to set the path of nginx error log for Nginx UI, so we can view the log content online. + diff --git a/frontend/docs/guide/config-openai.md b/frontend/docs/guide/config-openai.md new file mode 100644 index 00000000..5b8364e8 --- /dev/null +++ b/frontend/docs/guide/config-openai.md @@ -0,0 +1,32 @@ +# Open AI + +This section is for setting up ChatGPT configurations. Please be aware that we do not check the accuracy of the +information you provide. If the configuration is incorrect, it might cause API request failures, making the ChatGPT +assistant unusable. + +## BaseUrl + +- Type: `string` + +This option is used to set the base url of the api of Open AI, leave it blank if you do not need to change the url. + +## Token + +- Type: `string` + +This option is used to set the token of the api of Open AI. + +## Proxy + +- Type: `string` + +This option is used to configure the proxy for OpenAI's API. If you are unable to access OpenAI's API in your country or +region, you can use an HTTP proxy and set this option to the corresponding URL. + +## Model + +- Type: `string` +- Default: `gpt-3.5-turbo` + +This option is used to set the ChatGPT model. If your account has the privilege to access the gpt-4 model, you can +configure this option accordingly. diff --git a/frontend/docs/guide/config-server.md b/frontend/docs/guide/config-server.md new file mode 100644 index 00000000..701402bc --- /dev/null +++ b/frontend/docs/guide/config-server.md @@ -0,0 +1,79 @@ +# Server + +The server section of the Nginx UI configuration deals with various settings that control the behavior and operation of +the Nginx UI server. In this section, we will discuss the available options, their default values, and their purpose. + +## HttpPort + +- Type: `int` +- Default: `9000` + +Nginx UI server listen port. This option is used to configure the port on which the Nginx UI server listens for incoming +HTTP requests. Changing the default port can be useful for avoiding port conflicts or enhancing security. + +## RunMode + +- Type: `string` +- Supported value: `release`, `debug` + +::: tip +At present, we have not yet adapted to this option, and there will be no significant differences between release and +debug in terms of usage. +::: + +## HTTPChallengePort + +- Type: `int` +- Default: `9180` + +This option is used to set the port for backend listening in the HTTP01 challenge mode when obtaining Let's Encrypt +certificates. The HTTP01 challenge is a domain validation method used by Let's Encrypt to verify that you control the +domain for which you're requesting a certificate. + +## Database + +- Type: `string` +- Default: `database` + +This option is used to set the name of the sqlite database used by Nginx UI to store its data. + +## StartCmd + +- Type: `string` +- Default: `login` + +This option is used to set the start command of the web terminal. + +::: warning +For security reason, we use `login` as the start command, so you have to log in via the default authentication method of +the Linux. If you don't want to enter your username and password for verification every time you access the web +terminal, please set it to `bash` or `zsh` (if installed). +::: + +## PageSize + +- Type: `int` +- Default: 10 + +This option is used to set the page size of list pagination in the Nginx UI. Adjusting the page size can help in +managing large amounts of data more effectively. + +## CADir + +- Type: `string` + +When applying for a Let's Encrypt certificate, we use the default CA address of Let's Encrypt. If you need to debug or +obtain certificates from other providers, you can set CADir to their address. + +::: tip +Please note that the address provided by +CADir needs to comply with the `RFC 8555` standard. +::: + +## GithubProxy + +- Type: `string` +- Suggestion: `https://ghproxy.com/` + +For users in mainland China who may experience difficulties downloading resources from Github, this option allows them +to set a proxy for github.com to improve accessibility. diff --git a/frontend/docs/public/favicon.ico b/frontend/docs/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..6c40bc91735edc02e7d3c6b71f34845ce0e5db42 GIT binary patch literal 67646 zcmeHQSxj74nl6*bi6Soqn+pbGc8ra=wlQ0xsMBh-qV85dj52DeA6l)}s2@gAYaaSx zG@6%Sz`GqUDciJ-W4z!69D+AocD$uC9gRj&W)zL4fhwR3n9WeY#U>T2lr!Id?!8rY z3#f&HIO_h1PO8p5_fm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1l!b5bM)(5U|BV1p9LqZY z#{RF_0}Sl{1jhi!lsN4}rV0pUC_@BhRFuYdoa z&VLa9)B_Bu0}%tX@vEtC#q~jPJRI2n4c_}R&H(ZLZydXLZ1IJ&VTspemVvKQnV zYff(&Z%Ipy_=^_t2Fd^B!1=$x*$?JFUf74vuYY;4AwOr}be@WHbn0khjyifVTOGTc zrFwAgdb}wkRXoUw_haIEexf<&RZnx~CX#9NQZ{7FR)^2#sK{N^!LtQxM_aajFMX)E zz63wa2rvSS03*N%FanGKBftnS0*nA7zz8q`i~u9R2rvSS03*N%FanGKBftnS0*nA7 zzz8q`i~u9R2rvSS03*N%FanGKBftnS0*nA7zz8q`i~u9R2rvSS03*N%FanGKBftnS z0*nA7zz8q`i~u9R2rvRK1OdT6j6fs=me38`19!=}%{u=sWbTVF_lB%bM3}on)*nWg zSB0$Gs;u%ZvChAH$vXFi%)PHz*S#yP^NEnTJJY)Ee%m^K7&5PV-@0BUtn($-`FEl7 zm#pi)SFCey=zOJheInC3cZbX$zHME9_`Y=xVJ-67Lgvtz;Pvlbvd(>>^H;3v-j&w* zM93WCT7JL#ZR;H3Th^=I519+=oD@7rUR&rK;#$@rZrC}*wXA1Gn7 -import { useData } from 'vitepress' - -const { theme, page, frontmatter } = useData() - - -## Results - -### Theme Data -
{{ theme }}
- -### Page Data -
{{ page }}
- -### Page Frontmatter -
{{ frontmatter }}
-``` - - - -## Results - -### Theme Data -
{{ theme }}
- -### Page Data -
{{ page }}
- -### Page Frontmatter -
{{ frontmatter }}
- -## More - -Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).