Since custombuild 2 gives us opportunity to have a reverse-proxy NGINX Apache on a server and that's quite easy to start using it, we need a small customization to get content cached with Varnish (do you really need it?).
Instructions can be found here: Reverse-proxy NGINX + Apache on Directadmin powered server
Install Varnish by your favourite guide (or any from the official site):
As for now varnish does not support SSL, so it will cache only requests to plain HTTP.
Modify the files
Change 6081 to any other value of TCP post where Varnish is accepting connections.
Rewrite nginx virtual hosts:
echo "action=rewrite&value=nginx" >> /usr/local/directadmin/data/task.queue /usr/local/directadmin/dataskq
Have a good day!
We have many reports and emails that the guide is not working (they think so)! Be sure, it's still working. The root cause of a confuse is that the guide does not cover how to install and configure Varnish. You still need to update settings in /etc/varnish/default.vcl. And at least the backend port should be changed to 8080.