My server is not serving proper virtual host

I switched my DNS servers to Cloudflare. at first everything seemed to work fine

came back a few hours later, and Cloudflare is not showing my sites anymore, they are all virtual hosts on apache, but instead it is showing the default page for the ip address for the apache web server.

I had to switch my dns away from Cloudflare and now my sites are working again

how do I fix this?

yes, it worked with https

second, why would not working with https cause it to server a different virtual host? that makes no sense

Without seeing your Apache config, it’s impossible to give you any recommendations.

Cloudflare will send you requests with the appropiate Host header, any mishandling of those will be as a result of your server.

I found the problem.

cloudflre claims all you have to do is set your nameservers to Cloudflare but this is not true.

it had my dns (on Cloudflare) for my old cdn which, when removed, started the site working again

simply setting the nameservers to Cloudflare is insufficient

when I have proxy on, my site does not work, it serves the default virtual host.

when I disable proxy, my site works again.

what is wrong?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

In order to assist, we need the details here.

As mentioned on your ticket, as soon as you are going to provide us with necessary information for us to troubleshoot the issue, we can look into this for you.
Without that information, we cannot assist

This support article here will also help you in understanding what type of information we typically need to work on a ticket:

https://support.cloudflare.com/hc/en-us/articles/200172476-Contacting-Cloudflare-Support#h_7b55d494-b84d-439b-8e60-e291a9fd3d16