nginx tcp流转发
  F6QlXT8NkCQB 2023年11月02日 32 0

./configure --prefix=/usr/local/nginx-1.24.0 --user=nginx --group=nginx --conf-path=/usr/local/nginx-1.24.0/etc/nginx.conf --http-client-body-temp-path=/usr/local/nginx-1.24.0/cache/client_temp --http-proxy-temp-path=/usr/local/nginx-1.24.0/cache/proxy_temp --http-fastcgi-temp-path=/usr/local/nginx-1.24.0/cache/fastcgi_temp --http-uwsgi-temp-path=/usr/local/nginx-1.24.0/cache/uwsgi_temp --http-scgi-temp-path=/usr/local/nginx-1.24.0/cache/scgi_temp --with-compat --with-debug --with-http_geoip_module --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_degradation_module --with-http_slice_module --with-http_auth_request_module --with-pcre --with-pcre-jit --with-mail --with-mail_ssl_module --with-threads --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module

如果是yum安装

yum install nginx-mod-stream -y
stream {
    upstream tcp_game_8999 {
        hash $remote_addr;
        server 192.168.11.88:8999 max_fails=5 fail_timeout=300s;
    }
    server {
        listen 8090;
        listen [::]:8090;
        #server_name  a.com;
        proxy_pass tcp_game_8999;
    }
}
【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  P3nxyT0LRuwj   2023年11月28日   29   0   0 nginxhtmlWeb
  jnZtF7Co41Wg   2023年12月11日   37   0   0 nginx客户端服务端
  jnZtF7Co41Wg   2023年11月28日   21   0   0 nginx文件名linux命令
  stLBpDewCLT1   2023年12月08日   30   0   0 nginx
  jnZtF7Co41Wg   2023年12月10日   22   0   0 nginx客户端服务端NFS
  eHipUjOuzYYH   2023年12月06日   30   0   0 nginxHTTP
  eHipUjOuzYYH   2023年12月06日   27   0   0 nginx加载IPV6