Complete virtual hosting allows separate configuration files for each virtual domain. To enable complete support for virtual hosting on the FTP server, you can create or modify the following FTP configuration files for specific domains:
If separate versions of the configuration files are unavailable, master versions of the files in the /etc/ftpd directory are used.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Add the following entry to the /etc/ftpd/ftpservers file.
IP address of the virtual server
Directory that contains the configuration files that are customized for the virtual host
While it is possible to use hostname as the address of the virtual server, you are strongly encouraged to use the IPv4 address instead. DNS must be available when the FTP connection is received in order for hostname to be matched. For an IPv6 host, use the host name rather than the IPv6 address.
To create a customized version of an FTP server configuration file for the virtual host, copy the master version of the file from /etc/ftpd to the /config-file-dir directory.
For further information, see ftpservers(4).
# # FTP Server virtual hosting configuration file # 10.1.2.3 /net/inet/virtual/somedomain/ 10.1.2.4 /net/inet/virtual/anotherdomain/
The preceding example specifies the IP addresses for two different domains on the virtual server.
The ftpaddhost(1M) script with the -c option is provided to configure complete virtual hosts.
In the following example, ftpaddhost is run with -c -b -x options to configure complete virtual hosting with a test banner and the logfile /var/ftp/virtual/10.1.2.3/xferlog under a virtual root /var/ftp/virtual/10.1.2.3.
# ftpaddhost -c -b -x /var/ftp/virtual/10.1.2.3/xferlog \ /var/ftp/virtual/10.1.2.3