问下nginx如何安装一个正向代理的模块ngx_http_proxy_connect_module?

情况是这样的,我内部服务器需要通过一个外部服务器正向代理到https的网站,然后我在外部服务器安装了nginx,然后nginx上需要安装一个模块ngx_http_proxy_connect_module
但是我自己本地测试一直没安装成功,就问下大家有没有安装成功过的?我外部服务器系统是ubuntu22.04
我用的nginx是刚刚从官网下载的1.25.4
然后我cd到nginx的目录
然后我 patch -p1 < /root/ngx_http_proxy_connect_module/patch/proxy_connect.patch
然后我 ./configure –add-module=/root/ngx_http_proxy_connect_module
然后make && make install
一切都运行正常。
然后我编辑/usr/local/nginx/conf/nginx.conf
添加一个测试的server

server {
        listen 80;
        proxy_connect;
        proxy_connect_allow 443 80;
        proxy_connect_read_timeout 10s;
        proxy_connect_send_timeout 10s;
        proxy_connect_connect_timeout 10s;
        localtion / {
                proxy_pass $scheme://$http_host$request_uri;
        }
   }

然后我启动nginx,nginx -c /usr/local/nginx/conf/nginx.conf
然后就报了一个错误

nginx: [emerg] unknown directive "proxy_connect" in /usr/local/nginx/conf/nginx.conf:40

找不到那个模块
然后我执行:nginx -V
nginx version: nginx/1.25.4
built by gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) 
configure arguments: --add-module=/root/ngx_http_proxy_connect_module

有没有用过这个模块成功的?

《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!