设置nginx与上游哪吒面板grpc保持连接

This commit is contained in:
Lemoe 2022-06-20 11:45:13 +08:00 committed by GitHub
parent 05a310ff94
commit 85c0e41d64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -17,9 +17,15 @@ server {
location / { location / {
grpc_read_timeout 300s; grpc_read_timeout 300s;
grpc_send_timeout 300s; grpc_send_timeout 300s;
grpc_pass grpc://localhost:5555; grpc_socket_keepalive on;
grpc_pass grpc://grpcservers;
} }
} }
upstream grpcservers {
server localhost:5555;
keepalive 1024;
}
``` ```
- Caddy configuration files - Caddy configuration files

View File

@ -17,9 +17,15 @@ server {
location / { location / {
grpc_read_timeout 300s; grpc_read_timeout 300s;
grpc_send_timeout 300s; grpc_send_timeout 300s;
grpc_pass grpc://localhost:5555; grpc_socket_keepalive on;
grpc_pass grpc://grpcservers;
} }
} }
upstream grpcservers {
server localhost:5555;
keepalive 1024;
}
``` ```
- Caddy 配置 - Caddy 配置