Example 2:  Small ISP hosting two virtual domains
Internet Midwest (IMW) is a small (fictional) Internet Service Provider who wants to give two of their bigger customers their own virtual servers.  They will be running NcFTPd on a machine dedicated for WWW and FTP service, www.imw.com (192.168.42.1).  Their two virtual domains are foo.com (192.168.42.17) and bar.com (192.168.42.33).

Here is the domain.cf that IMW will be using:

The first thing you'll notice is that IMW made heavy use of the @SETNAME@ cookie.  So for example, in the last configuration, the anonymous FTP directory, ftp-home, expands to /home/ftp/ftp.bar.com.  IMW chose to do this because if they ever need to add additional domains, they can simply copy the last set and replace the values on the first two lines.

The next thing to notice is that IMW used ftp.imw.com as the default domain.  This is important because in the event that a new domain is added but the server configuration was inadvertantly left unchanged, the new domain would come into the ftp.imw.com set, instead of a possible competitor's virtual domain.

IMW also chose to offer only anonymous access on the two virtual domains, while allowing both regular and anonymous access on the default domain.

Up
Previous: Example 1  NcFTPd Home  Next: Example 3