Documentation forServ-U File Server

Serv-U domain details: virtual hosts

Virtual hosts provide a way for multiple domains to share the same IP and listener port numbers.

Normally, each domain listener must use a unique IP address and port number combination. But you can use virtual hosts to host multiple domains on a system with just one unique IP address without having to use non-standard port numbers. The domains can share the same listeners by proper implementation of virtual hosts. This feature is only available when the current license supports hosting multiple domains.

To configure virtual hosts for a domain:

  1. Click Add under Domain Details > Virtual Hosts.
  2. Enter the virtual host name for the domain.

The virtual host name is usually the fully qualified domain name used to connect to the domain, such as ftp.servu_example.com.

The method used by a client to connect to a specific virtual host depends on the protocol that is used to connect to Serv-U.

FTP

FTP users can use one of two methods to connect to a specific virtual host. If it is supported by the FTP client, the HOST command can be issued to Serv-U before login to identify the virtual host. Otherwise, the virtual host can be provided with the login ID in the following format: virtual_host_name|login ID. The virtual host name is entered first, followed by the vertical bar character ('|'), then the login ID.

SFTP

SFTP users who want to connect to a specific virtual host must use the specially crafted login ID format as described in the FTP section.

HTTP

For HTTP users, the browser automatically provides Serv-U with the host name that is used to reach the site, allowing Serv-U to identify the virtual host from the fully qualified domain name entered into the navigation bar of the browser.

Case file: using virtual hosts

Multiple domains are being configured on the same server, which has one IP address and two Fully Qualified Domain Names (FQDN) pointing to it. Because users connecting to both domains must use port 21 for connections, you must configure virtual hosts on each domain so Serv-U can distinguish between requests for the two domains. After setting up the same listener properties on each domain, open the Virtual Hosts page, click Add, and enter the FQDN that clients should use to connect to the domain (such as ftp.servu_example.com).

After connecting to the server with FTP, users can send a HOST ftp.servu_example.com command to connect to the appropriate domain on the File Server. FTP and SFTP users can also identify the virtual host through their login ID of ftp.servu_example.com|login ID. If connecting through HTTP, users can connect to this domain by visiting ftp.servu_example.com.