nginx 配置golang

  作者:会飞的

upstream go { server 127.0.0.1:9090;}server { server_name www.test.com test.com; location /go { proxy_pass_header Server; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr;

upstream go {

   server 127.0.0.1:9090;

}

server {

   server_name www.test.com test.com;

   location /go {

           proxy_pass_header Server;

           proxy_set_header Host $http_host;

           proxy_redirect off;

           proxy_set_header X-Real-IP $remote_addr;

           proxy_set_header X-Scheme $scheme;

           proxy_pass http://go;

     }

}


有用  |  无用

猜你喜欢