Hey,
Yes, I understand that the FTP protocol doesn't support vhosting on a single port/ip, and that's not what I'm trying to do. I'm trying to stop it.
Let's say, for example, the default IP of the box is...
1.1.1.1
the shared hostnames that we're adding are on the IP address...
1.1.1.2
1.1.1.1 Is the default FTP server on the system. Any user can connect to this IP address and login with their username & password - fine except that it pointed to by ftp.MYDOMAIN.com (and not ftp.theirdomain.com).
ftp.theirdomain.com points to 1.1.1.2 by default when the account (and DNS record) is created.
As soon as I add the new account, it adds a new vhost record at the end of the proftpd config.
So, I have my first customer come to me. He wants me to host domain1.com. I create the account, it's the first account on the box, ProFTPD puts it as the top and only vhost entry in the config file. Great, no problem, he can connect to ftp.domain1.com (1.1.1.2) with his regular userid & pass.
Then somebody else comes along and wants me to host domain2.com. I create the account, it adds it to the end of the proftpd config. Oops, there's a problem. The user tries to connect to ftp.domain2.com (also pointing to 1.1.1.2), but ProFTPD thinks it's receiving ftp.domain1.com (the first vhost on that IP in the config), so the login doesn't work (which works fine when connectiong through the default server on 1.1.1.1).
So, how can I disable automatic creation of these vhosts in the proftpd config if the new account I'm creating is on a given IP address? Basically, have both 1.1.1.1 and 1.1.1.2 use the default passwd file (/etc/proftpd/passwd.vhosts)
For now, I've just erased all the vhosts from the config, but are they going to be re-added by Cpanel whenever a user makes a change to their FTP settings? (allow/disallow anon ftp, etc.. - which doesn't work anyway on a shared IP, so it's no big deal), or when I add a new account to the box?