How to install and deploy ftp image server in linux

How to install and deploy ftp image server in linux

Refer to the tutorial on setting up FTP server in Linux https://www.jb51.net/article/117779.htm

Today I will share with you a tutorial on how to install and deploy an FTP image server in Linux. Friends who are interested can take a look!

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

For detailed installation and configuration, see Installing vsftpd and nginx.

2. Build an image server environment

2.1 Achieved Effect

For example, a picture is uploaded to the server /home/ftpuser/www/images directory through an ftp client. I want to access the picture file in the ftp directory through the nginx reverse proxy server. The URL address is: upload/2022/web/car.jpg, that is, using http requests to access static resource files that originally required ftp requests to access.

2.2 Specific implementation method

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

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

1) root maps /images to the /home/ftpuser/www/directory;
2) autoindex on turns on the browsing function;
After the modification is complete, restart nginx.
Modify the access permissions of the ftp user:

chown ftpuser /home/ftpuser

chmod 777 -R /home/ftpuser

2.3 Accessing image test

Just enter the access address through the browser (Note: you need to close the firewall or open port 20 data and port 21 control to access)

service iptables stop

or

systemctl stop firewalld

This is the end of this article about installing and deploying ftp image server in linux. For more relevant content about linux ftp image server, please search previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Tutorial on setting up FTP server in Linux
  • Configuring SFTP Server on Linux (CentOS)
  • Introduction to the method of quickly building an FTP server in Linux environment
  • How to build SFTP server and image server on Linux cloud server

<<:  MySQL index principle and usage example analysis

>>:  JavaScript canvas realizes the effect of nine-square grid cutting

Recommend

Summary of several common logs in MySQL

Preface: In the MySQL system, there are many diff...

MySQL 8.0.18 adds users to the database and grants permissions

1. It is preferred to use the root user to log in...

$nextTick explanation that you can understand at a glance

Table of contents 1. Functional description 2. Pa...

Detailed explanation of Vue monitoring attribute graphic example

Table of contents What is the listener property? ...

How to use cutecom for serial communication in Ubuntu virtual machine

Using cutecom for serial communication in Ubuntu ...

Differences between proxy_pass in two modules in nginx

1. The proxy_pass directive of the 1.ngx_stream_p...

How to underline the a tag and change the color before and after clicking

Copy code The code is as follows: a:link { font-s...

Have you carefully understood Tags How it is defined How to use

Preface : Today I was asked, "Have you carefu...

JavaScript singleton mode to implement custom pop-up box

This article shares the specific code of JavaScri...

Use Navicate to connect to MySQL on Alibaba Cloud Server

1. First enter the server's mysql to modify p...

How to view nginx configuration file path and resource file path

View the nginx configuration file path Through ng...

Several ways to use require/import keywords to import local images in v-for loop

Table of contents Problem Description Method 1 (b...

The use of v-model in vue3 components and in-depth explanation

Table of contents Use two-way binding data in v-m...