-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
41 lines (32 loc) · 1.17 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent"';
server {
listen 2080 http2;
access_log logs/access.log main;
location /helloworld.Greeter {
# Replace localhost:50052 with the address and port of your gRPC server
# The 'grpc://' prefix is optional; unencrypted gRPC is the default
# proxy_pass http://127.0.0.1:50052;
grpc_pass grpc://localhost:50052;
}
location /helloworld.LangService {
# Replace localhost:50051 with the address and port of your gRPC server
# The 'grpc://' prefix is optional; unencrypted gRPC is the default
grpc_pass grpc://localhost:50051;
}
}
server {
listen 80;
server_name localhost;
client_max_body_size 1024M;
location /api/helloworld.Greeter {
proxy_pass http://127.0.0.1:50052;
proxy_set_header Host $host:$server_port;
}
}
}
events {
worker_connections 1024; ## Default: 1024
}