Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx grpc_pass works only on root

This works:

server {
    listen 5005 http2;
    
    location / {
        grpc_pass grpc://my_app:5001;
    }

    default_type application/grpc;
}

this doesnt work:

server {
    listen 5005 http2;
    
    location /test {
        grpc_pass grpc://my_app:5001;
    }

    default_type application/grpc;
}

I receive logs when I go to localhost:5005, it looks like this:

192.168.0.1 - - [20/Sep/2021:10:18:02 +0000] "POST /tasks.TasksServiceGRPC/AskForJob HTTP/2.0" 200 153 "-" "grpc-node/1.24.7 grpc-c/8.0.0 (windows; chttp2; ganges)" "-"

When I go to localhost:5005/test, I'm not even getting the logs in nginx

on http 1.1 everything is working fine

like image 266
adriannowaq Avatar asked Oct 20 '25 11:10

adriannowaq


1 Answers

It is not possible with grpc, because of request structure

like image 198
adriannowaq Avatar answered Oct 23 '25 02:10

adriannowaq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!