nginx反向代理ftp服务器怎么搭建

1.安装nginx

2.安装vsftpd

3.修改nginx的配置文件nginx.conf

  3.1 首行添加ftp的用户

  user ftpuser;

nginx反向代理ftp服务器怎么搭建

  3.2 配置相关路径

  server {

    listen 80;  #nginx代理的端口

    server_name localhost;  #ftp服务器的地址

    location /images {  
    root /home/ftpuser;  #代理ftp服务器的文件夹的绝对路径
    index ftpuser;    #设置欢迎页
    autoindex on;    #打开文件目录列表
    autoindex_exact_size on;  #显示文件大小
    autoindex_localtime on;  #显示时间
    charset utf-8,gbk;  #设置编码
    }

  } 

nginx反向代理ftp服务器怎么搭建

4.使用命令./nginx -s reload应用配置文件

5.使用命令./nginx -s quit 关闭nginx

6.使用命令./nginx启动nginx

7.在浏览器中输入网站访问

nginx反向代理ftp服务器怎么搭建

© 版权声明
THE END
喜欢就支持一下吧
点赞11 分享