Vutlr Vps Website - Cant make Cloudflare work

Hello, i need help. I have a vps in Vultr, and i setup a website on the vps. I have a domain too on Godaddy, but i setup the Dns here in Cloudflare.

The domain, is pointing to Godaddy hosting IP, but now i want to use the Vps hosting, i changed the ip in the Dns (here in Cloudflare) but i get “Error 502 Bad gateway” when the DNS goes through Cloudflare, but if it doesnt go through Cloudflare the domain works and it shows the vps website. But well thats not what i want.

Anyone know what may cause this ? I know its probable something that i have to do on the Vps, but no idea what. I opened https, http ports.

Most of my sites are on Vultr. One domain is registered at GoDaddy. This is very workable.

I didn’t change any of my settings at Vultr to get this to work. Your GoDaddy account should have your domain set to use the Cloudflare name servers.

Your Vultr dashboard will tell you the IP address of your Droplet you need to use in your Cloudflare DNS settings.

What’s your domain?

1 Like

My domain is

(Using sub domain to test out the connection to Vps)

It looks like you’re off to a good start. If you go to Cloudflare DNS and set pag to :grey:, does your site work?

1 Like

Yes, it works.

That just doesn’t sound right. Since I don’t know your Vultr IP address, it’s not something I can test out. If you have some time to open a Support ticket, login to Cloudflare and then contact Cloudflare Support

1 Like

Yeah is kinda wierd, not sure whats happening and how does Cloudflare exactly works, it just doesnt work with the :orange: set. Should i post the ip here of the Vultr ? I will try the support ticket too

If you don’t mind posting the IP. Then edit it out once this is resolved.

While we’re poking around, I see you’re using HTTPS for that subdomain. Do you have an SSL certificate installed for that subdomain on Vultr? And is your SSL setting here Full (Strict)?

I’m seeing a different result than earlier. Back to my last question, does your VPS have an SSL certificate for your domain? If you don’t have SSL set up, you’ll have to change your SSL setting here to Flexible.

Keep in mind, the address will still show in the posting edit history.

Good point. But that’s the only way the community can troubleshoot this issue. I suppose he/I could just delete the post.

1 Like

Delete should certainly work :+1:

He should post a screenshot and then delete the post…

1 Like

Sorry for being late here. As expected. It was a problem with bad configuration on the VPS.

My apache2 service didnt had the SSL module enable. So port 443 was not listening.

Now i solved that, but i dont have the SSL certificate installed on the Vps, so now getting “SSL handshake failed” i will try to solve this too on my own. If not, i will come back here.

Thanks for trying to help. Will mark this solved for now

------- Here to add the fix (On my case) for the SSL Handshake failed

I used the Cloudflare tutorial to add a Origin Certificate (On teh SSL/TLS app in dashboard). Still got the issue of the handshake (And some problems with the files i had to edit, that in my apache2 version were called different and they were in different places) … But at the end, the solution after making the whole tutorial was this :

"Turned out that the default-ssl.conf was not enabled by default (the apache2 default configuration for https pages).

To fix this run: a2ensite default-ssl.conf
Don’t forget to: service apache2 reload"

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.