Using gRPC nginx gateway

Maxim Dounin mdounin at
Fri Jun 4 15:20:38 UTC 2021


On Fri, Jun 04, 2021 at 07:54:00AM +0000, babu vel wrote:

> Am using nginx 1.17.3 version and trying to enable http2 and 
> gRPC gateway. I compiled it enabling http_v2 and gRPC module. 
> However, am still getting below error reporting unknown 
> directive "grpc_pass", can you please let me know what is the 
> issue here?
> # nginx -c /nginx/conf/grpc.conf -t
> nginx: [emerg] unknown directive "grpc_pass" in 
> /nginx/conf/grpc.conf:165
> nginx: configuration file /nginx/conf/grpc.conf test failed

The error message suggests that you have no gRPC proxy module 
compiled in.  Check the "nginx -V" output - my best guess is that 
you haven't updated the nginx binary you are running.

Note well that nginx 1.17.3 is obsolete long time ago and should 
not be used.  Consider updating to nginx 1.21.0 or nginx 1.20.1.


> # strings nginx | grep grpc_pass
> grpc_pass
> grpc_pass_header

Note that "strings nginx" will look into "nginx" file in the 
current directory, while running nginx will look for the nginx 
binary in PATH.  In most cases these aren't the same thing.

Maxim Dounin

More information about the nginx mailing list