Keywords: WordPress - Google Cloud Platform - Technical issue - Secure Connections (SSL/HTTPS)
bndiagnostic ID: 34cda628-54de-d35a-ac00-3e2105fd9703
? Resources: Found possible issues ? Apache: Found possible issues https://docs.bitnami.com/installer/faq/linux-faq/administration/increase-memory-linux/ https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/ https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/
bndiagnostic failure reason: The suggested guides are not related with my issue
The Wordpress website has been running on a VM Instance (Google Cloud) for some time without a Load Balancer. When the site was initially setup on the VM instance, SSL was configured using the auto configured Lets Encrypt Certificate.
Now we have setup a load balancer using the Google Cloud and are getting “err too many redirects” when we point the domain A Record to the Load Balancer.
I’ve tried to use the Load Balancer instructions for Google Cloud (following the steps here - which are for multi-tier, and somewhat out of date):
At Step 8: For a single Wordpress site installation, which files should be modified in the application instance to configure the HTTP redirection?
The files “wordpress-vhost.conf”, “bitnami.conf”, “bitnami-ssl.conf” , for example, all include a series of http and https rewrite conditions and rewrite rules in the <VirtualHost… block.
We can see that there is a line to set environment already present by default in
opt/bitnami/apache/conf/bitnami/bitnami.conf at the top of the file. Where this line is already present by default:
SetEnvIf x-forwarded-proto https HTTPS=on
Can you please specify what new lines are to be added and if they are to replace or added beneath or above the existing conditions and rules? I am very confused about which files to edit and where, as far as it relates to the edits to the rewrite rules.
When the Load Balancer has a Google Managed Certificate, what should be done with the Lets Encrypt Certificate that was already installed on the installation? Should the certificate be removed on the installation? If so, how is this done? With the bnn-cert tool?
In the wp-config file I have modified the WP_SITEURL and WP_HOME (below). Is this correct for the load balancer settings or should this be restored to the default?
*in my wp-config file I modified the http to https and included my actual domain name.
Should the following line also be added to wp-config, beneath the lines above (as mentioned in the instructions for the AWS installs)?:
if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false)