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

WBOY
WBOY 转载
2023-05-17 09:31:18 2142浏览

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服务器怎么搭建

以上就是nginx反向代理ftp服务器怎么搭建的详细内容,更多请关注php中文网其它相关文章!

声明:本文转载于:亿速云,如有侵犯,请联系admin@php.cn删除