Remote PHP, MySQL and IMAP servers?

I need to deploy a setup where ISPConfig3 should handle both Dovecot2, PHP and MySQL/Memcached hosted in a different server within the cluster. The node and the services' servers will be connected over a VPN or SSH tunnel, whichever is most convenient for this purpose.