Working with BOA ( Barracuda / Octopus / Aegir ) , I've installed a few Drupal sites without any problems and following the same process for all.
BOA is running on Nginx. All sites are going thru Cloudflare's network , where I set the same DNS settings.
A example.com points to IPADDRESS
A www points to IPADDRESS
the nameservers of each domain are pointing to Cloudflare's respective nameservers.
It all works , except for one site that works perfectly without "www" , but with "www" returns the typical database error if Drupal can't find the site's database.
Site off-line
The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.
If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider.
In BOA, all sites have the same alias, basically a symlink, redirecting like this...
www.example.com -> example.com
Something isn't configured properly on your server & you should contact your hosting provider for assistance. A database error wouldn't be coming from CloudFlare & would be some sort of configuration issue directly on the server.
Actually, it seems to have been a Drupal issue. I'm basically trying to bring up to date a Drupal website that's still at version 6.16 with loads of out of date modules.
With the exact same configuration and a different Drupal version, the error went away. I couldn't identify the issue, but knowing that it was an update problem was sufficient.