Macos 安装openresty+ngx_http_proxy_connect_module

curl -o openresty-1.19.3.1.tar.gz https://openresty.org/download/openresty-1.19.3.1.tar.gz
tar -xzf openresty-1.19.3.1.tar.gz
cd openresty-1.19.3.1

# 不能直接使用自带的openssl

curl -o openssl-1.1.1i.tar.gz https://www.openssl.org/source/openssl-1.1.1i.tar.gz
tar -xzf openssl-1.1.1i.tar.gz
./configure -j12 --prefix=/Users/kai/opt/package/openresty --pid-path=/usr/local/var/run/openresty.pid --lock-path=/usr/local/var/run/openresty.lock --conf-path=/Users/kai/opt/package/openresty/nginx.conf --http-log-path=/usr/local/var/log/nginx/access.log --error-log-path=/usr/local/var/log/nginx/error.log --with-cc-opt=-I/usr/local/include --with-ld-opt=-L/usr/local/lib --with-pcre-jit --without-http_rds_json_module --without-http_rds_csv_module --without-lua_rds_parser --with-ipv6 --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_geoip_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-luajit-xcflags=-DLUAJIT_NUMMODE=2 --with-openssl=./openssl-1.1.1i --add-module=/Users/kai/opt/project/ngx_http_proxy_connect_module
git clone https://github.com/chobits/ngx_http_proxy_connect_module.git
patch -d build/nginx-1.19.3/ -p 1 < /Users/kai/opt/project/ngx_http_proxy_connect_module/patch/proxy_connect_rewrite_101504.patch
make
make install
ln -s /Users/kai/opt/package/openresty/bin/openresty /usr/bin/nginx

posted @ 2021-01-23 15:57  Railg-Kai  阅读(432)  评论(0编辑  收藏  举报