Step 1

in server.modules  enable "mod_setenv"

 

The solution to fix your problems after installing the CDN module and having imagecaches not generated.

Our setup is the following:

1 Varnish (cache and loadbalancer)