Show Table of Contents
21.2.2.2. Starting Multiple Copies of vsftpd
Sometimes, one computer is used to serve multiple
FTP domains. This is a technique called multihoming. One way to multihome using vsftpd is by running multiple copies of the daemon, each with its own configuration file.
To do this, first assign all relevant
IP addresses to network devices or alias network devices on the system. For more information about configuring network devices, device aliases, see Chapter 10, NetworkManager. For additional information about network configuration scripts, see Chapter 11, Network Interfaces.
Next, the DNS server for the
FTP domains must be configured to reference the correct machine. For information about BIND, the DNS protocol implementation used in Red Hat Enterprise Linux, and its configuration files, see Section 17.2, “BIND”.
For
vsftpd to answer requests on different IP addresses, multiple copies of the daemon must be running. In order to make this possible, a separate vsftpd configuration file for each required instance of the FTP server must be created and placed in the /etc/vsftpd/ directory. Note that each of these configuration files must have a unique name (such as /etc/vsftpd/vsftpd-site-2.conf) and must be readable and writable only by the root user.
Within each configuration file for each
FTP server listening on an IPv4 network, the following directive must be unique:
listen_address=N.N.N.N
Replace N.N.N.N with a unique
IP address for the FTP site being served. If the site is using IPv6, use the listen_address6 directive instead.
Once there are multiple configuration files present in the
/etc/vsftpd/ directory, all configured instances of the vsftpd daemon can be started by executing the following command as root:
~]# service vsftpd start
See Section 21.2.2.1, “Starting and Stopping vsftpd” for a description of other available
service commands.
Individual instances of the
vsftpd daemon can be launched from a root shell prompt using the following command:
~]# vsftpd /etc/vsftpd/configuration-file
In the above command, replace configuration-file with the unique name of the requested server's configuration file, such as
vsftpd-site-2.conf.
Other directives to consider altering on a per-server basis are:
anon_rootlocal_rootvsftpd_log_filexferlog_file
For a detailed list of directives that can be used in the configuration file of the
vsftpd daemon, see Section 21.2.2.5, “Files Installed with vsftpd”.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.