浏览 7.4k
新装的CentOS-7-x86_64-Minimal-1810.iso
执行的步骤如下:
yum install -y epel-release && yum install -y wget git patch libxml2 libxslt-devel gd-devel perl-devel perl-ExtUtils-Embed GeoIP GeoIP-devel GeoIP-data gcc redhat-rpm-config pcre-devel openssl openssl-devel
cd /opt
wget https://openresty.org/download/openresty-1.19.3.2.tar.gz
git clone https://github.com/chobits/ngx_http_proxy_connect_module.git
tar -xzf openresty* && cd openresty*
按github的ngx_http_proxy_connect_module操作步骤执行https://github.com/chobits/ngx_http_proxy_connect_module
./configure --add-module=/opt/ngx_http_proxy_connect_module
patch -d build/nginx-1.19.3/ -p1 < /opt/ngx_http_proxy_connect_module/patch/proxy_connect_rewrite_1018.patch
make && make install
然后报错

这个模块修改了Nginx框架源码,所以你得先打patch,改完框架源码后,再用add-module来configure\make编译
src/os/unix/ngx_files.c:404:9: error: 'pwritev' is only available on macOS 11.0 or newer [-Werror,-Wunguarded-availability-new]
n = pwritev(file->fd, vec->iovs, vec->count, offset);
^~~~~~~
error: 'pwritev' is only available on macOS 11.0 or newer [
是不是你的macos版本太低了?
ticket已经明确地表明了NGINX开发团队的态度,不支持环境变量实现正向代理,可以尝试使用stream配置proxy_pass转发数据,不过解决方案就不是那么简单了。
微信公众号
加入微信群