Closed opsconquer closed 8 years ago
addrs的定义文件在nginx/src/core/ngx_resolver.h
nginx_tcp_proxy_module的头文件在ngx_tcp_upstream.h的结构体ngx_tcp_upstream_resolved_s中 这是因为在1.9版本起addrs的结构体由ngx_addr_t 改为ngx_resolver_addr_t,如果只是为了安装1.8上,只要直接将ngx_resolver_addr_t改为ngx_addr_t 即可,如果要兼容所有版本,改为下面的代码
ngx_resolver_addr_t *addrs;
ngx_addr_t *addrs;
in_addr_t *addrs;
编译tenginx-2.1.2 作为反向代理
报错: In file included from /data/software/nginx_tcp_proxy_module-master/ngx_tcp.h:32:0, from /data/software/nginx_tcp_proxy_module-master//ngx_tcp.c:5: /data/software/nginx_tcp_proxy_module-master/ngx_tcp_upstream.h:143:5: error: unknown type name ‘ngx_resolver_addr_t’ ngx_resolver_addr_t addrs; ^ make[1]: ** [objs/addon/nginx_tcp_proxy_module-master/ngx_tcp.o] Error 1 make[1]: Leaving directory `/home/ec2-user/tengine-2.1.2' make: *\ [build] Error 2