mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
docs: update nginx proxy example
This commit is contained in:
parent
d9f78318f1
commit
e38380aac0
3 changed files with 0 additions and 15 deletions
|
@ -48,11 +48,6 @@ The second server block listens on port 443 (HTTPS) along with the HTTP/2 protoc
|
||||||
as well. Replace `<your_server_name>` with your server name and the paths for the SSL certificate and key with
|
as well. Replace `<your_server_name>` with your server name and the paths for the SSL certificate and key with
|
||||||
`/path/to/ssl_cert` and `/path/to/ssl_cert_key`.
|
`/path/to/ssl_cert` and `/path/to/ssl_cert_key`.
|
||||||
|
|
||||||
::: warning
|
|
||||||
We might need to remove `http2` in `listen 443 ssl http2;` and `listen [::]:443 ssl http2;` to avoid the warning in
|
|
||||||
Nginx v1.24+ versions.
|
|
||||||
:::
|
|
||||||
|
|
||||||
Additionally, the configuration includes a map directive for setting the value of the `$connection_upgrade` variable
|
Additionally, the configuration includes a map directive for setting the value of the `$connection_upgrade` variable
|
||||||
based on the $http_upgrade variable, which is used for WebSocket connections.
|
based on the $http_upgrade variable, which is used for WebSocket connections.
|
||||||
|
|
||||||
|
|
|
@ -45,11 +45,6 @@ server {
|
||||||
第二个服务器块监听 443 端口(HTTPS)以及 HTTP/2 协议。同样,它也监听 IPv6 地址。将 `<your_server_name>` 替换为您的服务器名称,并将
|
第二个服务器块监听 443 端口(HTTPS)以及 HTTP/2 协议。同样,它也监听 IPv6 地址。将 `<your_server_name>` 替换为您的服务器名称,并将
|
||||||
SSL 证书和密钥的路径替换为 `/path/to/ssl_cert` 和 `/path/to/ssl_cert_key`。
|
SSL 证书和密钥的路径替换为 `/path/to/ssl_cert` 和 `/path/to/ssl_cert_key`。
|
||||||
|
|
||||||
::: warning 警告
|
|
||||||
为了避免在 Nginx v1.24+ 版本中出现警告,我们需要删除 `listen 443 ssl http2;` 和 `listen [::]:443 ssl http2;`
|
|
||||||
中的 `http2` 指令,因为 `ssl` 指令默认支持 `http2`。
|
|
||||||
:::
|
|
||||||
|
|
||||||
此外,配置包括一个 `map` 指令,用于根据 `$http_upgrade` 变量设置 `$connection_upgrade` 变量的值,该变量用于 WebSocket 连接。
|
此外,配置包括一个 `map` 指令,用于根据 `$http_upgrade` 变量设置 `$connection_upgrade` 变量的值,该变量用于 WebSocket 连接。
|
||||||
|
|
||||||
在第二个服务器块中,`location /` 部分包含代理设置,将请求转发到本地端口 `9000`
|
在第二个服务器块中,`location /` 部分包含代理设置,将请求转发到本地端口 `9000`
|
||||||
|
|
|
@ -45,11 +45,6 @@ server {
|
||||||
第二個伺服器塊監聽 443 埠(HTTPS)以及 HTTP/2 協議。同樣,它也監聽 IPv6 地址。將 `<your_server_name>` 替換為您的伺服器名稱,並將
|
第二個伺服器塊監聽 443 埠(HTTPS)以及 HTTP/2 協議。同樣,它也監聽 IPv6 地址。將 `<your_server_name>` 替換為您的伺服器名稱,並將
|
||||||
SSL 證書和金鑰的路徑替換為 `/path/to/ssl_cert` 和 `/path/to/ssl_cert_key`。
|
SSL 證書和金鑰的路徑替換為 `/path/to/ssl_cert` 和 `/path/to/ssl_cert_key`。
|
||||||
|
|
||||||
::: warning 警告
|
|
||||||
為了避免在 Nginx v1.24+ 版本中出現警告,我們需要刪除 `listen 443 ssl http2;` 和 `listen [::]:443 ssl http2;`
|
|
||||||
中的 `http2` 指令,因為 `ssl` 指令預設支援 `http2`。
|
|
||||||
:::
|
|
||||||
|
|
||||||
此外,配置包括一個 `map` 指令,用於根據 `$http_upgrade` 變數設定 `$connection_upgrade` 變數的值,該變數用於 WebSocket 連線。
|
此外,配置包括一個 `map` 指令,用於根據 `$http_upgrade` 變數設定 `$connection_upgrade` 變數的值,該變數用於 WebSocket 連線。
|
||||||
|
|
||||||
在第二個伺服器塊中,`location /` 部分包含代理設定,將請求轉發到本地埠 `9000`
|
在第二個伺服器塊中,`location /` 部分包含代理設定,將請求轉發到本地埠 `9000`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue