Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to configure a tcp forwarding function in nginx

Shulou Source: shulou.com Published: 2022-06-01 23:52:33 10月04日 Update

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.

Tags: Configuration help function clarity content for this articles beginners more modules knowledge industry information information channels problems needs channels access learning support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB vpn Redmi Microsoft