章工运维 章工运维
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)

章工运维

业精于勤,荒于嬉
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)
  • linux

  • windows

  • 中间件

    • nginx

      • nginx配置教程
      • nginx常用配置
      • keepalived的原理和web服务高可用实践
      • 在CentOS 7上编译安装Nginx
      • nginx配置下载站点
      • nginx配置代理ftp
        • nginx配置php程序负载均衡
        • nginx反代grpc
      • kafka

      • rabbitmq

      • centos7.9部署keepalived
      • 应用性能监控-skywalking
    • 网络

    • 安全

    • 存储

    • 防火墙

    • 数据库

    • 系统

    • docker

    • other

    • 监控

    • 运维
    • 中间件
    • nginx
    章工运维
    2023-06-12
    目录

    nginx配置代理ftp

    # 配置文件如下

    打开nginx.conf

    
    user  nginx;
    worker_processes  1;
    
    error_log  /var/log/nginx/error.log warn;
    pid        /var/run/nginx.pid;
    
    
    events {
        worker_connections  1024;
    }
    stream {
      upstream ftp{
            #hash $remote_addr consistent;
            server ftp.cmegroup.com:21;
        }
    
    server {
            listen 21;
            #listen 20;
            proxy_connect_timeout 300s;
            proxy_timeout 300s;
            proxy_pass ftp;
       }
    }
    
    
    http {
        include       /etc/nginx/mime.types;
        default_type  application/octet-stream;
    
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33

    在需要访问代理的服务器上设置hosts

    8.210.13.112 ftp.cmegroup.com
    
    1

    访问成功

    [root@host-172-16-40-12 ~]# ftp ftp.cmegroup.com
    Connected to ftp.cmegroup.com (8.210.13.112).
    220-This system is for authorized CME Group users only.
    220-
    220-Individuals using or accessing this system are subject to having all
    220-activities on this system monitored, logged and/or recorded.
    220-Anyone using or accessing this system expressly consents to such
    220-monitoring, logging and/or recording and is advised that if such
    220-monitoring, logging and/or recording reveals possible evidence of criminal
    220-activity, improper usage or hacking, systems personnel
    220-may provide the evidence of such monitoring, logging and/or recording to
    220-management, governmental authorities and/or any other
    220-third parties.  Any attempted hacking or use of hacking tools on this
    220-machine (or any other associated or related system) will
    220-be pursued under corporate guidelines as well as under all applicable
    220-federal, state and local laws and regulations.
    220 
    Name (ftp.cmegroup.com:root):
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    微信 支付宝
    上次更新: 2023/06/12, 22:07:24

    ← nginx配置下载站点 nginx配置php程序负载均衡→

    最近更新
    01
    shell脚本模块集合
    05-13
    02
    生活小技巧(认知版)
    04-29
    03
    生活小技巧(防骗版)
    04-29
    更多文章>
    Theme by Vdoing | Copyright © 2019-2025 | 点击查看十年之约 | 鄂ICP备2024072800号
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式