SSL Issue with Lightsail load balancer

Keywords: WordPress - AWS - Technical issue - Secure Connections (SSL/HTTPS)

bndiagnostic ID: 9a2fbd7d-ffd9-55c5-2a53-134e724c8778

bndiagnostic output:

? Apache: Found possible issues
? Wordpress: Found possible issues
? Resources: Found possible issues

Hey There - I have created a wordpress site on lightsail. Originally, it was created as a single stand alone server.

I used bncert-tool to create the ssl certificates. I also force http to https. This is all working without exception on the instance thru the domain name.

it’s since become a bigger site and so I have had to add instances and a load balancer in lightsail.

I created the new instances from a snapshot of the existing instance (including the bncert-tool generated certificates). The instances are fine and i can log into them no issues via https (i.e. from the domain or the ip addresses of the instances) they are also showing up as healthy targets in my LB (i’m using a custom health check against an empty health.html file).

In the LB, i have added the certificate from Amazon and enabled force http to https.

However, I can’t open anything thru the LB. I get ERR_TOO_MANY_REDIRECTS and also warnings the my connection isn’t private and there are certificate errors.

I believe this is due to the fact that i used bncert-tool to create the initial certificae on the original instance. I then snapshotted that instance (including the bncert-tool generated certificates on the instance) and created the new instances from this snapshot.

How do i fix this certificate conflict? is it due to the bncert-tool certificates and what do i need to do get this working thru the load balancer?



Hi @Opalchenitz,

I recommend the following guide that shows how to set up SSL for load balancer:


Hi Michiel -

thanks for this. However, I’m using lightsail, as i mentioned. Therefore, my load balancer shows up only in lightsail. as the result, the instructions you sent are not compatible with the setup that is available in lightsail for loadbalancers (lightsail > Networking > Load balancer). In Lightsail, you don’t have access to the routings or security groups for example.

Can you please send the requisite instructions for SSL with lightsail load balancers? I have a certificate from Amazon already on my load balancer.

As I mentioned, i believe there is a conflict between the certificates I installed on my lightsail instance using the bncert-tool and the certificate on the lightsail loadbalancer.

I look forward to your response.

Hi @Opalchenitz,

The configuration inside the VM should be the same in both cases, could you check it? You can skip the steps to configure the load balancer as you are using the Lightsail Load Balancer.


Hey Michiel -

for the VM, i assume you mean check the EC2 instance?

As i mentioned, I also created the instances in lightsail, so they don’t show up in EC2 dashboard. So the steps that you sent are not possible for me to check as i created the instances in LIGHTSAIL.

can you please either explain more what you mean, send the correct instructions for LIGHTSAIL, or pass me on to someone who actually knows how to address the question that I’m asking?


Hi @Opalchenitz,

Can you check the output of the following command:



Hi Michiel -

I’ve ran the comment and have the output. to where shall i send it? or do i just post it here?


Hi @Opalchenitz,

Can you paste it here?


Here you go

HTTP/1.1 301 Moved Permanently
Server: awselb/2.0
Date: Mon, 30 May 2022 14:28:22 GMT
Content-Type: text/html
Content-Length: 134
Connection: keep-alive

HTTP/2 301 
date: Mon, 30 May 2022 14:28:45 GMT
content-type: text/html; charset=UTF-8
server: Apache/2.4.52 (Unix) OpenSSL/1.1.1n
x-powered-by: PHP/7.4.27
x-redirect-by: WordPress

HTTP/1.1 200 OK
Date: Mon, 30 May 2022 14:28:46 GMT
Server: Apache/2.4.52 (Unix) OpenSSL/1.1.1n
X-Powered-By: PHP/7.4.27
Link: <>; rel="", <>; rel="alternate"; type="application/json", <>; rel=shortlink
Content-Type: text/html; charset=UTF-8

Hi @Opalchenitz,

The domain seems to point to the instance and not to the loadbalancer:

You need to reconfigure the DNS settings to make it point to the loadbalancer IP.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.