Search⌘ K
AI Features

Enabling HTTPS on Our Load Balancer

Discover how to enable HTTPS on your AWS load balancer by creating an HTTPS listener with TLS/SSL encryption, configuring your security group to allow port 443 traffic, and testing secure access to your WordPress blog. This lesson guides you through using AWS CLI commands to secure your site with encryption.

We are very close to enabling HTTPS for our WordPress blog! We're now ready to enable HTTPS on our load balancer. To do so, we need to add a new HTTPS listener that will accept encrypted connections on port 443 and forward requests via HTTP to our WordPress instances on port 80.

Creating an HTTPS listener

Creating an HTTPS listener is very similar to creating an HTTP listener. We just need to specify a few more parameters regarding the TLS/SSL encryption.

1.

Do you remember how we set up the HTTP listener?

Show Answer
Did you find this helpful?

Use the command below to create the HTTP listener:

Shell
aws elbv2 create-listener \
--load-balancer-arn $(aws elbv2 describe-load-balancers \
--names wordpress-lb \
--query 'LoadBalancers[0].LoadBalancerArn' \
--output text) \
--protocol HTTP \
--port 80 \
--default-actions Type=forward,TargetGroupArn=$(aws elbv2 describe-target-groups \
--names wordpress-instances \
--query 'TargetGroups[0].TargetGroupArn' \
--output text)
...