Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/doc/proftpd-doc/howto/ drwxr-xr-x |
Viewing file: Select action/file-type: ProFTPD: Virtual Servers
What is a virtual server?
Until very recently, the definition of FTP did not allow for name-based
virtual hosts, such as supported by HTTP/1.1. That changed with
RFC 7151, which defined a
In some documents, one might see reference to both "daemon" and
"server". Sometimes these words are used interchangeably; however,
there is a slight difference. A "daemon" is a long-lived process
on a host machine, and a "server" is a process that provides some
service, typically to remote clients. A process, such as a standalone
There are three "server" contexts (sometimes also called
sections) in the
The <VirtualHost 1.2.3.4> ... </VirtualHost>defines a configuration for a virtual server that proftpd should
use whenever a remote client connects to the IP address 1.2.3.4. DNS names,
too, can be used with the <VirtualHost> configuration
directive:
<VirtualHost ftp.mydomain.com> ... </VirtualHost>When proftpd parses this section on startup, it will resolve the
given DNS name to its IP address and use that, just as if that IP address
had been used in the first place. In addition, when DNS names are used like
this, ProFTPD will automatically create a ServerAlias directive using that DNS name.
This allows for multiple <VirtualHost> sections using the
same DNS name to be defined in your proftpd.conf .
If you want the same vhost to be used for multiple different names at the
same time (e.g. because you have multiple DNS names for the same
server), you would use the <VirtualHost ftp.mydomain.com> # Use this vhost for other names, too ServerAlias ftp.mydomain.org ftp2.mydomain.com ftp.otherdomain.org ... </VirtualHost>
The <Global> ... </Global>Anything inside of a <Global> section is applied to every
server configuration in the file, to every <VirtualHost> as
well as the default "server config" server.
Which brings us to the "server config" section. The name is
ill-suited, and is really borrowed directly from Apache's naming conventions.
The "server config" context refers to anything not in a
However, one particular drawback to the "server config" section was
that it did not provide a way to specify to which IP address that configuration
pertained. By default, when
By default, every server will listen to port 21, the IANA standard port for
FTP. If you want to have server react to a different port, use the
Port 0in any server context will effectively "disable" that server. This is sometimes used to disable the "server config" configuration.
There is another configuration directive that comes into play in all of this
:
If you would like the same virtual host configuration to be used for
multiple different IP addresses (or DNS names), the
<VirtualHost 1.2.3.4 5.6.7.8> ... </VirtualHost>
If, however, you want to specific the address to which the configuration
of the "server config" context, use
There is one last configuration directive about which an administrator should
know: SocketBindTight onThis configures the daemon to "bind tightly" only to those IP addresses to which it has been configured to listen, rather than every address. By default, the proftpd daemon will listen to every address on
the host machine.
Question: Why do I see the following when I start - warning: "Virtual Server" address/port (1.2.3.4:21) already in use by "Main Server"Answer: This happens when a <VirtualHost> section is "hidden" behind the default server in the "server config"
section (i.e. the context that is outside of all <VirtualHost> and <Global> sections). It is "hidden" because
both the <VirtualHost> section and the "server config"
section are using the same IP address and port.
It is quite common to configure
The quick-and-easy fix is to place the following your "server config" section
in your Port 0as mentioned above. You can also use the DefaultAddress
directive in the "server config" section to explicitly tell the "server config"
section to use a different IP address/DNS name.
Question: How can I have my "server config" section
(or a <VirtualHost 1.2.3.4 ftp.example.com> ... </VirtualHost>And for the "server config" context, you would use the DefaultAddress directive, which can also handle multiple IP
addresses/DNS names:
DefaultAddress 1.2.3.4 ftp.example.com
© Copyright 2017 The ProFTPD Project All Rights Reserved |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0033 ]-- |