I’m trying to set up NPM with my domain name being handled with Cloudflare and I keep getting a Error 522 code.
Cloudflare’s webpage states:
- (Most common cause) Cloudflare IP addresses are rate limited or blocked in .htaccess, iptables, or firewalls. Confirm your hosting provider allows Cloudflare IP addresses. I’m struggling to work out how to do this properly on my debian.
- An overloaded or offline origin web server drops incoming requests. This is not the case, I have sufficient resources and it’s not offline.
- Keepalives are disabled at the origin web server. I don’t really understand what to look for this?
- The origin IP address in your Cloudflare DNS app does not match the IP address currently provisioned to your origin web server by your hosting provider. I have an A name record for mydomain.com pointing to my.external.IP.address and CNAME records for my services pointing to @.
- Packets were dropped at your origin web server.The only thing I can come up with is that I need to whitelist cloudflare’s IP addresses. If I ping the site npm.mydomain.com it comes back successful so I don’t think this is it.
If you know what I’m missing or you’d like me to provide further information or clarification, I’m all ears.
Are you connecting to NPM over a Cloudflare tunnel, or is Cloudflare only handling your DNS?