Open leonwind opened 2 years ago
for example my backend protoServer is ip:10000/notice.NoticeService then i will config my nginx conf
upstream grpc { server ip:10000; }
location /notice.NoticeService/ {
# proxy_pass http://grpc;
grpc_pass grpc://grpc;
}
Release the first two lines of comments for the above configuration and comment on the last line of configuration. The effect is equivalent So after my nginx configuration, I can directly use http://ip/notice.NoticeService/xx To access my grpc service
Hey, I am currently setting up a new webapp I have been building using gRPC as a backend and I want to now send my client gRPC requests to Nginx on my domain
domain/api
which then should forward it to the Envoy proxy running on port:8000
. The architecture looks roughly like this:Now in my webapp I want to create a new client to send the data to my service like this:
This doesn't work and I am getting the error:
If I expose the Envoy port and send the requests there directly with
it works perfectly but I would rather send the request to Nginx first and let it distribute to Envoy.
My
nginx.conf
looks like the following:My question is now how do I fix it and get Nginx to forward the requests correctly while sending the requests to
domain.com/api
.Thanks a lot for any help :) Best, Leon