Several websites with one IP + Cloudflare

#1

Hi, everybody!

I faced with a problem and ask help from community.

I have a VDS server. It work on Ubuntu server + Apache2. Originally it has just a one website - main-site.abc Then I created another two websites - site2.abc and site3.abc. all three websites have equal IP address. Everything worked perfectly.

I decided to protect my websites by Cloudflare and I changed DNS servers according instructions. And now nobody can to access to site2.abc and site3.abc! All requests to site2.abc and site3.abc are redirecting to main-site.abc. The same situation is happened if I try to access to my server by IP. It looks like Cloudflare doesn’t send server name with IP and Apache2 cannot recognize which website was requested.

Is it possible to protect by Cloudflare several websites on one IP server?

0 Likes

#2

Would like to ask - does your server respond over HTTP (port 80), HTTPS (port 443), or both? There may be issues with different configurations between the two ports.

1 Like

#3

It responds both of HTTP and HTTPS. And it worked correctly until the moment when I connected them to Cloudflare.

1 Like

#4

So…just to verify your Cloudflare setup is correct:
You have those three separate domains set up here at Cloudflare. Yes?
And if you go to each of them and click “Pause Cloudflare on Site” from your Overview page’s lower right corner, they work properly. Yes?

While you’re poking around, take a look at your server logs for what the request looks like for each of those domains.

EDIT: To answer your question, yes, it’s possible for Cloudflare to protect a bunch of domains on one IP address. I have several on one server with one IPv4 address and they all work. But they’re all set up individually here at Cloudflare.

0 Likes