ERR_TOO_MANY_REDIRECTS after installing ssl

Keywords: WordPress - Google Cloud Platform - Technical issue - Secure Connections (SSL/HTTPS)

bnsupport ID: d6b92208-4bb5-4e2e-a8e9-ead95356d55f

bndiagnostic output:

? Resources: Found possible issues
? Apache: Found possible issues
? Wordpress: 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/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
I have installed ssl 1day ago. today i am getting too many redirects. I previously faced this problem around 10 days ago, then I deleted that instance from cloud and started a fresh installation. But again today here is the same problem.

Hi @rakibulqasimi,

Thanks for using Bitnami. I reviewed your bndiagnostic information and visited your website using the curl tool. This is the redirection loop I’m getting for your website

$ curl -LI "http://etu***tu.in"
HTTP/1.1 302 Found
Date: Wed, 06 Oct 2021 08:15:32 GMT
Server: Apache/2.4.49 (Unix) OpenSSL/1.1.1d
Location: https://etu***tu.in/
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 302 Found
Date: Wed, 06 Oct 2021 08:15:32 GMT
Server: Apache/2.4.49 (Unix) OpenSSL/1.1.1d
X-Powered-By: PHP/7.4.23
X-Redirect-By: WordPress
Location: http://etu***tu.in/
Content-Type: text/html; charset=UTF-8

According to this output and the information in your wp-config.php file, WordPress isn’t configured to serve your website with HTTPS. Can you update the WP_HOME and WP_SITEURL parameters in your wp-config.php file to HTTPS? Please replace the your_domain.com placeholder with your real value

define( 'WP_HOME', 'https://your_domain.com/' );
define( 'WP_SITEURL', 'https://your_domain.com/' );

I have updated the same. After updating the admin panel (wp-admin) is accessible but front End is redirecting again

Another problem is I have installed ssl using bncert tool, but my ssl is showing invalid in browser.

Can you please check this bndiagnostic info
3d776f51-dbc8-e0f9-ae06-bc04624a639d
This is my another site having same issue

Hi @rakibulqasimi,

Thanks for your message. I think it is better to fix your issues one by one, so please let’s focus on your first server (https://etu***tu.in/) first. Can you run the bndiagnostic tool again in that server and share with us the new code? We would like to take a look at the updated information.

Can you also run the next command to get the domain configured in your database? It will prompt you for the DB_PASSWORD value in wp-config.php

sudo mysql -u bn_wordpress -p -e "USE bitnami_wordpress; SELECT option_name,option_value FROM wp_options WHERE option_name='siteurl' OR option_name='home';"

Actually the second server is most important, so I want to fix that first. Please check the second one i.e. nepeace.in

Hi @rakibulqasimi,

Thanks for your message. I visited your website and I see broken CSS there. I checked the bndiagnostic information and I think there is a typo in your wp-config.php file

define( 'WP_HOME', 'https://www.nepeace.in/' );
define( 'WP_SITEURL', 'https://www.npeace.in/' );

Notice the domain on each parameter is not exactly the same (https://www.npeace.in vs https://www.nEpeace.in). Can you update the file and restart the services? Does it fix your issue?

ok, olved the nepeace server
Now in etuhitu server:
I executed the following command but aftar that I typed password of wordpress admin password but typing not working. I type on keyboard but nothing displaying in command window. If wordpress admin password not works then could you please tell me where I can find the password. By the way i ran the bndiagnostic tool again and here is the key
11a20ee7-d154-57ee-feab-7adac957d5fa

Ok, I’ve succesfully executed the command and the reply was this
±------------±-----------------+
| option_name | option_value |
±------------±-----------------+
| home | http://127.0.0.1 |
| siteurl | http://127.0.0.1 |
±------------±-----------------+

Now my site is saying error establishing database connection

Hi @rakibulqasimi,

This is weird, did you make any change in the instance that caused this issue? Please note that we didn’t post here any command that modifies the database configuration. Are all services up and running? Do you have enough disk space available?

sudo /opt/bitnami/ctlscript.sh status
sudo df -H

khudezakpt@etuhitu-vm:~$ sudo /opt/bitnami/ctlscript.sh status
apache already running
mariadb already running
php-fpm already running
khudezakpt@etuhitu-vm:~$ sudo df -H
Filesystem Size Used Avail Use% Mounted on
udev 879M 0 879M 0% /dev
tmpfs 178M 19M 160M 11% /run
/dev/sda1 11G 4.1G 5.8G 42% /
tmpfs 889M 0 889M 0% /dev/shm
tmpfs 5.3M 0 5.3M 0% /run/lock
tmpfs 889M 0 889M 0% /sys/fs/cgroup
/dev/sda15 130M 6.0M 124M 5% /boot/efi
tmpfs 178M 0 178M 0% /run/user/1003
khudezakpt@etuhitu-vm:~$

Actually I had changed the database password from default to custom using phpmyadmin to run previous command given by you. And then I again changed the password to default one using phpmyadmin

Hi @rakibulqasimi,

I’m glad you fixed your issues with one of your servers. For the other one, I don’t see any error with the disk space or the MySQL database not working.

Actually I had changed the database password from default to custom using phpmyadmin to run previous command given by you. And then I again changed the password to default one using phpmyadmin

This shouldn’t be needed for running the mysql cli command we shared, but it looks like you were able to properly run it. Can you now connect with the MySQL database using the command-line tool and the new password you set? If so, update it in your wp-config.php file. Notice typing the password on the command line prompt won’t show any character for security reasons, but the command line is getting your characters though.

How can I update the password in wp-config.php. Should I update it as plain text?

Hi @rakibulqasimi,

Yes, you have to set it as plain text in the wp-config.php file.