Starting last week, I started working on getting CloudFlare up on some domains, I moved GSUser over to their Free plan to see how it worked. CloudFlare protects your website by sitting between your site and the visitor. They provide caching and protection against an array of attacks. Already on GSUser, they managed to cache 50% of all requests and protect me from almost 400,000 malicious requests.
After testing each individually, I decided to move my largest client over to a subdomain that was protected by CloudFlare and yet still running through Apigee and this is where things got messy. I had originally routed this subdomain to gsuser.com on Apigee, which then caused Cloudflare to run into a DNS loop.
In order to properly setup Cloudflare and an Apigee CNAME, follow these simple steps below:
- Create a new subdomain (A Address) and point it to your server(s). Then turn off Cloudflare protection on the subdomain.
- Go to Apigee and setup your new api and point it at this the subdomain you just created.
- After creating your API on Apigee, take your API URL (found under Settings) and create a new DNS CNAME record on Cloudflare pointing to this API URL. You will want CloudFlare protection on this subdomain.
- Now go back to Apigee, go to your API's Settings and click "Change CNAME". Then your CNAME is the public subdomain you just created.
- Now you can direct all your API clients to your public subdomain (public.gsuser.com will be active to prove it works for today).
Thanks,
James Hartig
No comments:
Post a Comment