系统相关
首页 > 系统相关> > Nginx grpc反向代理

Nginx grpc反向代理

作者:互联网

L111

https://grpc.io/  grpc官网

 

首先Grpc 默认编译进Nginx 但是依赖http_v2模块 需要编译进nginx 具体指令可以参考Nginx http 反向代理 指令都类似

分布式反向代理

 

server {
    server_name shop**.com.cn;

    root html;
    location / {
        grpc_pass localhost:50051; //这里指向GRPC服务端
    }

    listen 4431 http2; # managed by Certbot 这里要注意 要去掉 ssl
    ssl_certificate /etc/letsencrypt/live/http2.taohui.tech/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/http2.taohui.tech/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

 

标签:managed,ssl,grpc,etc,Nginx,letsencrypt,反向,Certbot
来源: https://www.cnblogs.com/jackey2015/p/10565907.html