【笔记】Nginx部署FTP服务器

前言

Nginx部署FTP服务器

准备工作

  • nginx

配置

  • user改为root
conf/nginx.conf
1
user  root;
  • 添加一个server

8080:访问端口
/root/share/:文件共享目录

conf/nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
autoindex on;# 显示目录
autoindex_exact_size on;# 显示文件大小
autoindex_localtime on;# 显示文件时间

server {
listen 8080 default_server;
listen [::]:8080 default_server;
server_name _;
root /root/share/;
location / {}
error_page 404 /404.html;
location = /40x.html {}
error_page 500 502 503 504 /50x.html;
location = /50x.html {}
}

启动

1
2
cd sbin
./nginx

完成

参考文献

CSDN——datadev_sh