Implementation of linux Installation and Deployment of ftp Image Server

  • 2021-08-17 01:26:42
  • OfStack

Refer to the tutorial on building FTP server in Linux https://www.ofstack.com/article/117779. htm

Today to share linux installation and deployment of ftp picture server tutorial, interested friends 1 to see it!

1. Install the http reverse proxy server and install the ftp file transfer component vsftpd

Please refer to Installing vsftpd and nginx for details of installation and configuration

2. Build a picture server environment

2.1 The effect of implementation

For example, the picture is uploaded to the server/home/ftpuser/www/images directory through the nginx reverse proxy server. The url address is: http://192.168.140.128/images/car. jpg, that is, using http request to access the static resource file that originally needed ftp request.

2.2 Specific implementation method

Modify nginx/conf/nginx. conf, add another location to the default server and specify the actual path of static resources in the server. The specific configuration is as follows:


location /images {
       root /home/ftpuser/www/;
       autoindex on;
    }

1) root maps the/images to the/home/ftpuser/www/directory;
2) autoindex on turns on the browsing function;
Restart nginx after modification.
Modify the access rights of ftp users:

chown ftpuser /home/ftpuser

chmod 777 -R /home/ftpuser

2.3 Access Picture Test

Enter the access address through the browser (Note: To close the firewall or open the 20 data port, the 21 control port can only be accessed)

service iptables stop

Or

systemctl stop firewalld


Related articles: