背景

公司内网一部分文件,需要在外网可以看到,内网路由设置FTP PASV模式麻烦/没成功。

 

nginx搭建服务器方法:

#安装nginx
yum install nginx
systemctl enable nginx.service

修改配置文件

server {
 location / {
                charset utf-8; #防止非ascii(中文等)字符乱码
                root    /data/ftp; #ftp上传文件的目录
                autoindex on; #开启目录浏览
        }
}

启动服务器

systemctl start nginx.service

效果如下:

 

posted on 2020-10-12 15:58  你不知道的浪漫  阅读(849)  评论(0编辑  收藏  举报