Reputation: 782
I have a website that is developed by WordPress. Recently I try to activate Google CDN for this website. My host provider is not google. After installing CDN it takes almost 3 hours to activate SSL. I replaced the IP that I created in A record of the website. I get this error :
ERR_TOO_MANY_REDIRECT
I disabled all plugins and rename .htaccess. But I read an article in TargetTrend website which was published one years ago that says:
If you are not hosting your site with Google Cloud Platform (GCP), you will be unable to use Google Cloud CDN. This is because Google Cloud CDN only works with Google load balancer and cloud storage origin.
Do you try to use Google CDN for your WordPress website which is not hosted by google cloud?
UPDATED: Adding the process I followed.
To make my question more clear I follow these steps:
I did not have google cloud account, so I signed up.
Network services >> Cloud CDN - In this they ask me to enable cloud engine and I enable that, later again I return to : Network services >> Cloud CDN
I click on Add Origin.
I set a name, and I choose customer origin, as IP address/Domain Name I type example.nl and Port 80
I click on Create new load balancer for me and type my-nl-website
under Custom request headers , I clicked on Add header, Host as header name, and example.nl as header value 1 and click on DONE
I went to Network service >> Load Balancer, here I clicked on the my-nl-website , there was an IP, I copy this IP and add an extra A record for this IP
Later I get error on this website is not secure
and I edited the load balancer, I creat a new IP and clicked on google certificate, and wait until SSL created.
Now instead of getting the website is not secure, I get redirect to many times.
Currently based on what I read in the Document, I try to create a load balancer and network endpoint group manually and then try cloud CDN. I hope this manual creation solves my problem.
Upvotes: 2
Views: 784
Reputation: 30160
Yes, you can use the Cloud CDN with external original also.
we were running it before and moved WordPress to GKE for redirect SSL error try adding snippet into config.php
once, plus make sure inside database wp_option or wp_setting
table have site URL are using HTTPS not HTTP
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
$_SERVER['HTTPS'] = 'on';
}
in cloud CDN you have options for backend service
, cloud bucket
and custom origin
also.
Ref document : https://cloud.google.com/cdn/docs/setting-up-cdn-with-ex-backend-internet-neg
Upvotes: 2