- Make that vHost also respond on a wildcard subdomain (ServerAlias cdn*.example.com)
- Configure Apache to use port 81
- Configure Varnish to use port 80
- Check the included vHost config ('examples/vhost.conf') if you plan on using HTTPS
- Use the included Varnish VCL ('examples/varnish.vcl') for caching all images for 1 week if the request was made to one of the CDN hosts
- Put all files into the DocumentRoot of the vHost you created
- Make sure mod_rewrite is enabled (a2enmod rewrite) and that you are allowed to use the .htaccess file in the DocumentRoot of the vHost (AllowOverride All)