Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure a tcp forwarding function in nginx

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to configure a tcp forwarding feature in nginx? Many novices are not very clear about this. In order to help you solve this problem, the following small series will explain it in detail for everyone. Those who have this need can come to learn. I hope you can gain something.

This is actually very simple, just add a module, but this does not come with it, you need to install it yourself:

-prefix=/usr/local/nginx -with-pcre=/home/soft/pcre-8.30 -with-openssl=/home/soft/openssl-1.0.2g -add-module=../ nginx_tcp_proxy_module-master

If it appears during installation:

configure: error: zlib library not found

Yum can be installed directly.

yum install zlib-devel;

The configuration is as follows:

server { listen 2049; proxy_pass my_server; access_log /home/logs/nginx/myserver.acc.log; Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report