Within this setup I would like to mount external FTP sites with TLS/SSL from the alias domain(s) to the onyx.local subscription. The problem is either (1) Plesk is not associating the correct CA Certificate with the domain aliases
It never did!!
FTP, SMTP, POP and IMAP are all using 1 certificate.
The Plesk interface on port 8443 is also configured to use 1 certificate.
You can set this certificate server-wide in Plesk settings.
For this you need SNI (Server Name Indication) and this is a reasonably new feature that's only supported in HTTP. It seems that the next version of Plesk (17.8) will have SNI-support for other servers than http (ftp, pop, imap, smtp).
Although those services themselves (Postfix, ProFTP and Dovecot) do support this, it is not configured that way.
On top of that you can't rely on the clients to support it.
Although all HTTP-browsers support SNI, it's a totally different ball game for the other clients.
Your PHP ftp-connect may not even support it.
So waiting for 17.8.3 may not be enough for you.
I totally avoid the reliance on SNI by providing 2 public hostnames for each client. These hostnames will match the wildcard domain I'm using on all my servers.
I tell client1 with the domain client1.com to connect his mail clients with
client1-com.wolf.com
If he wants to connect to the web/ftp server he needs to connect to
www-client1-com.wolf.com
For each client I have these 2 cnames that point to respectively mail.client1.com and client1.com.
client2.org would have the 2 other wolf.com cnames
client2-org.wolf.com IN CNAME mail.client2.org
www-client2-org.wolf.com IN CNAME client2.org
client2.org may point to another Plesk server of mine than client1.com.
To connect I tell client2 to connect to
I have an hourly cronjob that creates those cnames in wolf.com (typically after adding it to the DNS server). I have a separate Plesk for DNS on which wolf.com resides. You would have more difficulty to create those cnames automatically if you have more than 1 DNS (most people use the server on which the mail/website is running as authorative DNS for that domain). In that case you need to create the records cnames manually.
Not using the DNS of the different Plesk servers has more advantages than disadvantages in my scenario.
- I know I can always go to that server to get/edit all the DNS-info.
- I can manage the DNS of all my clients using scripts (think of the rotating DKIM-keys).
- Moving a site to another server of mine doesn't require a change at the registrar.
- DNS changes can't be done by clients (in my scenario an advantage, I can imagine it to be a disadvantage for others).
- The webservers are all on the same infrastructure. By having the primary server in another infrastructure I'm following best-practice.
Those 2 cnames will therefore always resolve to the appropriate AND match the wildcard certificate *.wolf.com I have defined there.
As icing on the cake I was able to expand on this by writing my own autoprovisioning that doesn't need an Nginx entry for each host but is capable to do that with a single server-wide entry.
Microsoft is doing something similar with their on-microsoft.com domain.
I even provide weekly rotating DKIM keys using my own domain as intermediate (just like Microsoft is doing).
I'm not using Plesk's DKIM solution.
[EDIT]
Are you aware that unlike the http-server (Nginx/Apache) that the ProFTP-server in its standard configuration?
- ...Is not aware of the hostname provided by the FTP-client
- ...It will always provide the certificate configured server-wide in Plesk. It may therefore not match with the hostname the FTP-client is supplying
- ...It is choosing the workspace based on the login, not on the hostname.
If the PHP FTP-connection is to itself (same server) why don't you do a plain FTP-connection to localhost? As you're obfuscating everything into meaningless hostnames I still can't get a grip on your specific scenario.