本文作者:kaifamei

如何搭建代理服务器

更新时间:2023-01-25 07:19:49 人在看 0条评论

如何搭建代理服务器


2023年1月25日发(作者:感谢师恩的诗句)

Nginx搭建正向代理服务器⽀持https

1,下载并解压模块githup地址

unzipngx_http_proxy_connect_

2,切换到服务器源码包位置

cd/usr/local/tools/nginx-1.14.2

3,配置编译注意版本对应关系

patch-p1

./configure--prefix=/usr/local/nginx--with-select_module--with-poll_module--with-file-aio--with-http_ssl_module--with-http_realip_module--with-http_addition_module--with-http_xslt_module--with-http_sub_module--with-http_dav_module--with-h

make

只make不makeinstall,会在当前⽬录的objs⽂件夹下⽣成名字为”nginx“的执⾏⽂件

4,备份原来的nginx执⾏⽂件拷贝新的过去

cpobjs/nginx/usr/local/nginx/sbin/

5,编写正向代理服务器配置⽂件

server{

resolver114.114.114.114ipv6=off;

resolver_timeout10s;

listen8080;

proxy_connect;

proxy_connect_allow44380563;

proxy_connect_connect_timeout20s;

proxy_connect_read_timeout20s;

proxy_connect_send_timeout20s;

location/{

proxy_passhttp://$host;

proxy_set_headerHost$host;

}

}

6,重启nginx完成配置。


文章投稿或转载声明

本文链接:https://www.en369.cn/fanwen/xinxi-8-140745-0.html

来源:范文频道-369作文网版权所有,转载请保留出处。本站文章发布于 2023-01-25 07:19:49

发表评论

验证码:
用户名: 密码: 匿名发表
评论列表 (有 条评论
2人围观
参与讨论